Compare commits

..

845 Commits

Author SHA1 Message Date
henderkes
3b8abda8c9 add libclang.cpu.a 2026-06-09 12:27:58 +07:00
henderkes
5747a5661e build shared extensions before frankenphp 2026-06-02 04:00:57 +00:00
henderkes
d52ba59edc fix SourcePatcher::patchHardcodedINI method signature 2026-05-30 09:08:49 +07:00
henderkes
2d5abd31c1 micro patch for cross-arch 32 bit builds 2026-05-29 23:15:53 +07:00
henderkes
69d0f9b8cc remove SPC_ARCH 2026-05-29 22:38:58 +07:00
henderkes
d846db2ef2 forward v2 fix 2026-05-26 00:51:16 +00:00
henderkes
f06891155c revert 2026-05-24 21:42:41 +07:00
henderkes
15deecd34f Merge remote-tracking branch 'origin/v3' into feat/pgo-v3 2026-05-24 20:26:50 +07:00
Marc
7ae5d742c2 V3 check/4 (#1159) 2026-05-24 20:24:11 +07:00
Marc
95be291a84 Merge branch 'v3' into v3-check/4 2026-05-24 20:24:03 +07:00
Marc
d89add106a V3 check/3 (#1158) 2026-05-24 20:23:44 +07:00
Marc
a36129c6cd V3 check/2 (#1157) 2026-05-24 20:23:32 +07:00
Marc
3f3edd62a1 Update src/Package/Extension/password_argon2.php 2026-05-24 17:57:02 +07:00
crazywhalecc
82b77af317 Chore: extension fixes
clickhouse, mongodb, opcache, password-argon2, pgsql, spx
2026-05-24 18:16:47 +08:00
crazywhalecc
df26b93e58 Remove redundant suffix for getClassesPsr4 function 2026-05-24 18:12:04 +08:00
crazywhalecc
d1b4c05381 Fix curl exe build on windows 2026-05-24 18:11:41 +08:00
crazywhalecc
e1658bc0e6 Chore: gettext-win version, password-argon2 deps 2026-05-24 18:09:51 +08:00
crazywhalecc
5053620b61 feat: auto-load local working directory registry in vendor mode 2026-05-24 18:07:06 +08:00
crazywhalecc
9366cbacd9 Update discord invite link 2026-05-24 18:06:30 +08:00
henderkes
fe4803cfaf run shared ext builds after frankenphp build 2026-05-24 12:15:40 +07:00
henderkes
80d81079db backport v2 passing correct libraries, not all 2026-05-24 12:15:04 +07:00
henderkes
6ab52a5181 cxxflags in spcconfigutil 2026-05-23 20:46:21 +07:00
henderkes
5bdcd3f562 dont pass all static exts to frankenphp build either 2026-05-23 20:02:24 +07:00
henderkes
203fed65d9 dont pass shared extension packages to SPCConfigUtil for building php (bleeds libpq polyfills into php configure, poisoning e.g. have_strlcat results) 2026-05-23 16:17:12 +07:00
henderkes
1ae989df59 simplify common zig code paths 2026-05-23 16:15:12 +07:00
henderkes
e7fb1e203f backport fixes from v2 2026-05-23 16:15:12 +07:00
Marc
713f8255af mongodb: export PHP_VERSION_ID for in-tree builds (#1156) 2026-05-23 07:35:24 +07:00
Luther Monson
3c24c92d61 mongodb: export PHP_VERSION_ID for in-tree builds
mongo-php-driver 2.3.3 added a config.m4 check that falls back to
php-config when PHP_VERSION_ID is unset in the shell env. In-tree
PHP source builds have no php-config, so configure fails with:

    checking PHP version... configure: error: php-config not found

Set PHP_VERSION_ID from main/php_version.h before configureForUnix
so the lookup short-circuits.
2026-05-22 10:03:43 -07:00
henderkes
d93fdd9707 use github tokens for package downloads 2026-05-22 23:06:25 +07:00
henderkes
c40d069b0c address #1155 2026-05-22 23:05:51 +07:00
henderkes
9d508f1d39 forward port v2 pgo changes 2026-05-22 15:42:51 +07:00
crazywhalecc
a23ad55fe2 Add preInstall stage 2026-05-22 14:03:26 +08:00
crazywhalecc
735f12648e Update discord invite link 2026-05-22 11:23:53 +08:00
Jerry Ma
6fe55a4d6b Merge branch 'v3' into feat/pgo-v3 2026-05-22 10:27:39 +08:00
Jerry Ma
b8ce9f7787 [v3] fix(windows): static builds vswhere.exe -product * (#1149) 2026-05-22 10:20:18 +08:00
Jerry Ma
6772403d81 [v3] fix: use ftpmirror.gnu.org instead of ftp.gnu.org (#1151) 2026-05-21 15:26:58 +08:00
Marc
60a91a82e1 [v3] fix(macos): static build remove -fno-plt from macOS CFLAGS (#1150) 2026-05-21 12:06:18 +07:00
Luther Monson
4a274b69ac fix: use ftpmirror.gnu.org instead of ftp.gnu.org
ftp.gnu.org is unreliable and frequently times out during CI builds.
ftpmirror.gnu.org is GNU's own CDN that auto-redirects to the nearest
mirror. This is the recommended download method per
https://www.gnu.org/prep/ftp.en.html

Also normalizes /pub/gnu/ paths to /gnu/ since ftpmirror only serves
the latter.

Affects: libiconv, gettext, gmp, idn2, libunistring, ncurses, readline
2026-05-20 21:09:34 -07:00
Luther Monson
e4edd0a00f Merge branch 'v3' into fix/macos-fno-plt 2026-05-20 21:05:54 -07:00
Luther Monson
ae26ef3bdb fix(macos): remove -fno-plt from macOS CFLAGS
-fno-plt is an ELF-only flag that has no effect on macOS Mach-O
targets — clang emits "argument unused" when it encounters it.
Libraries like xz that run -Werror sanity checks during configure
promote that warning to a fatal error, breaking the build.
2026-05-20 20:57:12 -07:00
Luther Monson
049ecfe0a5 Merge branch 'v3' into fix/vswhere-products 2026-05-20 20:54:26 -07:00
Jerry Ma
01a4d872ad fix windows test failures: path separators and arch normalization (#1148) 2026-05-21 10:50:33 +08:00
Luther Monson
a9e54bb725 fix(windows): add -products * to vswhere so Build Tools are found
vswhere.exe defaults to searching Community, Professional, and
Enterprise editions only. CI environments typically install the
lightweight Build Tools product which is a separate product type
(Microsoft.VisualStudio.Product.BuildTools). Without -products *
the tool returns no results and the build fails with "Visual Studio
with C++ tools not found".

See: https://github.com/microsoft/vswhere/wiki/Find-MSBuild
2026-05-20 18:36:58 -07:00
Marc
f1525c0ca7 Merge branch 'v3' into feat/pgo-v3 2026-05-20 16:55:02 +07:00
Luther Monson
ad9b9ec69f Merge branch 'v3' into v3-fix-windows-test-paths 2026-05-19 23:19:39 -07:00
Marc
8a37303925 Add a Log Filter to Strip Github Tokens (#1147) 2026-05-20 13:19:03 +07:00
Luther Monson
52d234f1f4 fix windows test failures: path separators and arch normalization 2026-05-19 21:59:18 -07:00
Luther Monson
a3c39576df filter secrets at logger callback; register basic-auth encoded blob 2026-05-19 21:23:43 -07:00
henderkes
433043c0c8 fix macOS 2026-05-19 23:22:52 +07:00
henderkes
b38c7b274f install runtime rt after zig init 2026-05-19 22:55:01 +07:00
henderkes
efa7946c14 build in SOURCE_PATH 2026-05-19 20:44:47 +07:00
henderkes
7bb4a09a3c turn llvm-tools into a doctor check. llvm-runtime is a target now 2026-05-19 20:02:13 +07:00
crazywhalecc
3eca044895 Whoops 2026-05-18 12:12:37 +08:00
crazywhalecc
32da708f54 Change gettext-win base to 0.18 (master is 1.0 now) 2026-05-18 12:05:06 +08:00
crazywhalecc
f27ec773a1 Refactor clang runtime bits support for zig integration 2026-05-18 10:55:39 +08:00
crazywhalecc
ce70c0df6a Register artifacts dynamically if not already initialized 2026-05-18 10:54:32 +08:00
crazywhalecc
fdc75cb9fe Allow vendor mode loading default registry file 2026-05-18 10:54:17 +08:00
crazywhalecc
697040b918 Trim base namespace for registry 2026-05-18 10:53:55 +08:00
henderkes
19d1379f7d better cross compile compatibility 2026-05-17 19:52:22 +07:00
henderkes
07aae79cae forward port #1142 2026-05-16 19:16:24 +07:00
henderkes
4b19f4ec95 forward port #1138 2026-05-15 14:54:04 +07:00
henderkes
1707d21569 don't extract local sources 2026-05-15 14:30:58 +07:00
henderkes
70e717adb6 fix version reevaluating regression from v2 2026-05-15 14:05:33 +07:00
henderkes
a88e426623 clean cgo cache before rebuilding frankenphp (reports wrong version from cgo includes, even if they're updated) 2026-05-15 12:54:05 +07:00
henderkes
6fda358c90 --build-frankenphp didn't actually build frankenphp 2026-05-15 12:36:34 +07:00
henderkes
09de4c9c70 drop ldflags fron watcher-c 2026-05-15 11:05:22 +07:00
henderkes
db794bf27b strange shit 2026-05-12 13:18:54 +07:00
henderkes
b880ef7003 allow * stage to subscribe to everything 2026-05-12 12:45:09 +07:00
henderkes
9addbe2c7d oops 2026-05-12 11:41:25 +07:00
henderkes
445c0b36c9 don't add fno-sanitize=undefined for library builds 2026-05-12 11:30:46 +07:00
henderkes
4754faf43e also build curl exe on windows 2026-05-12 11:24:55 +07:00
henderkes
2415b7db35 we don't need this anymore 2026-05-12 11:22:04 +07:00
henderkes
814014e122 array 2026-05-12 11:19:57 +07:00
henderkes
defd50f459 wrong exception type 2026-05-12 11:17:31 +07:00
henderkes
57ef0423d5 fix phpunit failure 2026-05-12 10:57:49 +07:00
henderkes
8453f69eea fix BUILD_CC=cc workaround root cause (minijit trips zig default undefined behaviour sanitizer) 2026-05-12 10:52:23 +07:00
henderkes
c1c34d8c10 trust filesystem, not downloads 2026-05-12 10:38:33 +07:00
henderkes
270e2d6471 cant reset it because of the same reason x( 2026-05-12 10:07:21 +07:00
henderkes
4172508cb9 use {pkg_root_path} for packages, otherwise containers get confused with different pkg_root_path set 2026-05-12 09:54:29 +07:00
henderkes
a585359b28 reset registry 2026-05-11 21:36:17 +07:00
henderkes
bfaa7ebb3a Merge remote-tracking branch 'origin/v3' into feat/pgo-v3 2026-05-11 21:05:54 +07:00
henderkes
7e6e9d869e add pgo capabilities v3 style 2026-05-11 19:06:40 +07:00
Marc
3f7bad75ec Feat/clickhouse (#1137) 2026-05-11 13:28:16 +07:00
crazywhalecc
a3f135d26c Simplify pull request template 2026-05-11 13:59:32 +08:00
Jerry Ma
0732c1f0b0 Merge branch 'v3' into feat/clickhouse 2026-05-11 13:18:16 +08:00
Jerry Ma
9b64ad8299 Add dev:gen-ext-test-matrix command (#1133) 2026-05-11 13:17:57 +08:00
henderkes
743934d1fe use resolved dependency tree instead of asking for with_suggests everywhere 2026-05-11 11:35:15 +07:00
henderkes
efdd2a74a5 update libraries to honour user flags 2026-05-11 10:05:33 +07:00
crazywhalecc
4d1ae0093d Bypass curl test on swow loaded time 2026-05-11 11:02:31 +08:00
Jerry Ma
db11d5a420 Update config/pkg/ext/ext-swow.yml 2026-05-11 11:01:43 +08:00
Marc
b20c1fa5c2 Update config/pkg/ext/ext-swow.yml 2026-05-11 09:49:19 +07:00
henderkes
6e3267273b better deduplicate_flags 2026-05-11 09:41:25 +07:00
crazywhalecc
bf38212814 Add isolated extension mark 2026-05-11 10:07:02 +08:00
crazywhalecc
42fdc4eb87 Use PHP 8.5 by default 2026-05-11 09:48:31 +08:00
crazywhalecc
685f5c565f Use PHP 8.5 by default 2026-05-11 09:47:10 +08:00
henderkes
4f7694267b toolchain fixes forward port from v2-pgo 2026-05-10 19:27:36 +07:00
crazywhalecc
b8ee484e81 Comment upterm session 2026-05-10 16:38:45 +08:00
crazywhalecc
c186038dca Use system cc instead 2026-05-10 16:27:25 +08:00
crazywhalecc
36e738f849 strange there 2026-05-10 16:06:20 +08:00
crazywhalecc
2cc3c8c9af Revert 2026-05-10 15:55:12 +08:00
crazywhalecc
0469b658bf Revert 2026-05-10 15:55:03 +08:00
crazywhalecc
7107566da7 Fix wrongly constructed class 2026-05-10 15:50:21 +08:00
crazywhalecc
02d8f51bb2 Enhance Unix Makefile patch to disable auto-vectorization for zig-cc to prevent minilua segfault 2026-05-10 15:17:51 +08:00
Jerry Ma
21c868463a Update tests.yml 2026-05-10 14:26:38 +08:00
Jerry Ma
079a30c5b1 Add tmate session setup for debugging on failure 2026-05-10 14:12:47 +08:00
crazywhalecc
64d9650f88 Fix compiler extra appending 2026-05-09 17:23:01 +08:00
crazywhalecc
e63d49ec13 Disable pdo pgsql hook for swow temporarily 2026-05-09 16:30:57 +08:00
Jerry Ma
9dbb178bf3 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-09 16:11:26 +08:00
henderkes
3f48413281 add clickhouse extension by ilia 2026-05-09 15:10:30 +07:00
henderkes
dc6e63e1ba fix logic errors in shared ext patching 2026-05-09 15:09:59 +07:00
crazywhalecc
6ad4b6a4af Add concurrency settings to GitHub Actions workflow 2026-05-09 16:07:22 +08:00
crazywhalecc
270f131f54 Add label event 2026-05-09 16:01:44 +08:00
crazywhalecc
ceade306b8 phpstan fix 2026-05-09 15:55:55 +08:00
crazywhalecc
629b5b6b2d Add test-bot 2026-05-09 15:54:01 +08:00
crazywhalecc
7b79767355 Add retry mechanism to Git clone and GitHub release fetching methods 2026-05-09 14:13:47 +08:00
crazywhalecc
2ed4b10260 Make brotli and zstd as dep 2026-05-09 14:13:09 +08:00
crazywhalecc
184a091fd9 Implicitly define swow dependencies (due to extension generating and windows swow curl bug) 2026-05-09 14:12:50 +08:00
crazywhalecc
e6642459b8 Fix opentelemetry strict flag 2026-05-09 12:16:48 +08:00
crazywhalecc
af3c6a6d08 Move build command here 2026-05-09 11:05:28 +08:00
crazywhalecc
e930873e60 Add tier 2 support for actions runner test 2026-05-09 11:00:26 +08:00
crazywhalecc
cd803c75c5 Add filtering options for extensions, libs, and OS in test matrix generation 2026-05-09 10:44:04 +08:00
crazywhalecc
ad7475246f Merge remote-tracking branch 'origin/v3-docs/readme' into v3-docs/readme 2026-05-09 10:33:10 +08:00
crazywhalecc
b09cc968e6 Add curl execute output log 2026-05-09 10:19:16 +08:00
crazywhalecc
bf308e89a5 Remove duplicate phar patch for micro 2026-05-09 09:49:53 +08:00
crazywhalecc
bf326de985 Fix extracting hosted type for zip archive caused overwriting 2026-05-09 08:17:03 +08:00
crazywhalecc
4f9a555bf3 ds use git (pecl have buggy config.w32) 2026-05-09 08:16:11 +08:00
crazywhalecc
04df87cd5f Make intl use c++17 2026-05-09 08:15:45 +08:00
crazywhalecc
e4201a28ca Add 'imagick' and 'intl' to standalone array 2026-05-08 23:11:48 +08:00
crazywhalecc
1b30c98fbd Make glfw standalone though 2026-05-08 22:51:49 +08:00
crazywhalecc
61747f6f4e Add frameworks for glfw 2026-05-08 22:51:17 +08:00
crazywhalecc
c374163a05 Fix windows mpir build 2026-05-08 22:37:05 +08:00
crazywhalecc
ee21199ebb Remove hosted binary temporarily 2026-05-08 22:33:06 +08:00
crazywhalecc
01607a06c9 Add spx compatible command arg 2026-05-08 22:32:50 +08:00
crazywhalecc
fd4bf90a70 Add standalone list 2026-05-08 22:23:14 +08:00
crazywhalecc
73bf9ff93f Add libzstd.lib for windows builds 2026-05-08 22:13:50 +08:00
crazywhalecc
dcf1c5942c Add macOS test, conflicts 2026-05-08 22:12:06 +08:00
crazywhalecc
4695f846f5 Add macOS test 2026-05-08 21:23:29 +08:00
crazywhalecc
37b5f89ee1 Add extra build flags for specific extensions 2026-05-08 21:07:49 +08:00
crazywhalecc
5e40982e85 Use windows-latest 2026-05-08 20:58:33 +08:00
crazywhalecc
1d1f58f3a1 Disable parallel downloading 2026-05-08 20:55:23 +08:00
crazywhalecc
be039802c0 Add exclude for gen-ext-test-matrix 2026-05-08 20:54:41 +08:00
crazywhalecc
5529e66a61 Add dom deps for xmlreader 2026-05-08 19:33:19 +08:00
crazywhalecc
641ad8becf Add patch for PHP 8.2 compatibility in imap extension 2026-05-08 19:27:11 +08:00
crazywhalecc
a19c4470bb Fix frameworks in unix cmake executor wrongly used by linux 2026-05-08 19:11:31 +08:00
crazywhalecc
143ae4b8c4 Use -i instead of -I (-I used by hardcoded INI) 2026-05-08 19:08:00 +08:00
crazywhalecc
a980b0a1df Use -i instead of -I (-I used by hardcoded INI) 2026-05-08 19:07:39 +08:00
crazywhalecc
a8a851659f Fix memcache build on PHP 8.5 2026-05-08 19:07:06 +08:00
crazywhalecc
6b6025d3f0 Add parallel download 2026-05-08 17:41:12 +08:00
crazywhalecc
4507c8feb4 Fix zig check on fresh installed spc 2026-05-08 16:47:34 +08:00
crazywhalecc
9f80d6b2a8 Add dev:gen-ext-test-matrix command 2026-05-08 15:57:15 +08:00
crazywhalecc
ca8a28a364 Group shell command 2026-05-08 10:06:30 +08:00
crazywhalecc
8e3e790cc3 Add migration guide 2026-05-08 10:06:21 +08:00
crazywhalecc
4218f2905a Add nightly release build 2026-05-07 16:41:43 +08:00
Jerry Ma
4f06548c28 Update deployment workflow and enhance documentation build process (#1131) 2026-05-07 16:30:26 +08:00
crazywhalecc
b92a06a468 Update deployment workflow and enhance documentation build process 2026-05-07 16:05:59 +08:00
Jerry Ma
88d2f0fc52 StaticPHP v3 alpha1 (#980) 2026-05-07 15:53:59 +08:00
crazywhalecc
9d4a8dd7c3 Update README to announce upcoming v3 release and project rename 2026-05-07 15:50:07 +08:00
crazywhalecc
742752fd66 Add discord server 2026-05-07 15:32:09 +08:00
crazywhalecc
e93d103e99 SPC_DEFAULT_LD_FLAGS renamed to SPC_DEFAULT_LDFLAGS 2026-05-07 14:56:07 +08:00
crazywhalecc
9e4a622f42 SPC_DEFAULT_CXX_FLAGS renamed to SPC_DEFAULT_CXXFLAGS 2026-05-07 14:55:45 +08:00
crazywhalecc
506cb15654 SPC_DEFAULT_C_FLAGS renamed to SPC_DEFAULT_CFLAGS 2026-05-07 14:55:05 +08:00
crazywhalecc
43663d2966 Adjust macOS flags 2026-05-07 14:47:42 +08:00
crazywhalecc
0cecda791d Remove debug log for scandirs 2026-05-07 14:40:43 +08:00
crazywhalecc
d3b7c9106f Add ConditionalOn attribute 2026-05-07 14:40:14 +08:00
crazywhalecc
8e46cda227 Use active rdkafka 2026-05-07 14:39:10 +08:00
henderkes
640d973693 add to cxxflags 2026-05-06 14:15:45 +07:00
henderkes
d54e39353d better performance and debugging defaults 2026-05-06 14:13:33 +07:00
henderkes
aecc227b9a suggestions from @crazywhalecc 2026-05-06 14:08:27 +07:00
crazywhalecc
2ae5a876f0 Fix #1129 2026-05-06 14:50:33 +08:00
crazywhalecc
ecf10bec7c Forward-port #1089 2026-05-06 14:43:37 +08:00
henderkes
90d7fe46d7 add ext-gearman 2026-05-06 11:39:08 +07:00
crazywhalecc
8537ad7b19 Fix mongodb 2.3.0 introduced in-tree build bug 2026-04-30 11:18:58 +08:00
crazywhalecc
737728ac24 Make swoole using 6.2.0 2026-04-30 11:16:59 +08:00
crazywhalecc
ffe998697f Improve GitHub source retrieval by using latest release endpoint and enhancing version handling 2026-04-30 11:16:52 +08:00
Jerry Ma
6b53c0afae V3 refactor/forward ports (#1123) 2026-04-30 07:58:08 +08:00
crazywhalecc
c9ce96044d Forward-port #1120 2026-04-29 16:54:20 +08:00
crazywhalecc
2bcf62249f Forward-port #1117 2026-04-29 16:53:43 +08:00
crazywhalecc
2c8c7214f0 Forward-port #1115 2026-04-29 16:52:20 +08:00
crazywhalecc
d745c7d9ec Add maintainer-skip-build option 2026-04-29 16:38:59 +08:00
crazywhalecc
48c3be7e70 Add shared extension output 2026-04-29 16:37:15 +08:00
crazywhalecc
d458f57c84 Forward-port #1110 2026-04-29 16:24:58 +08:00
crazywhalecc
c454a1dc8e Enhance Linux distribution detection and package installation commands (forward-port #1109) 2026-04-29 15:53:52 +08:00
crazywhalecc
9ed2b18d06 Forward-port #1107 2026-04-29 15:44:44 +08:00
crazywhalecc
e70f5252a1 remove workaround for zig < 0.16 (forward-port #1105) 2026-04-29 15:42:07 +08:00
crazywhalecc
d080a86f2b Update OpenSSL source matching patterns to version 3.x 2026-04-29 15:40:49 +08:00
Jerry Ma
55dff48545 V3 docs (#1119) 2026-04-29 15:37:24 +08:00
crazywhalecc
27c364f692 Update CLI documentation for clarity and accuracy 2026-04-29 15:33:06 +08:00
crazywhalecc
a73e6c0e7e Add craft-yml docs 2026-04-29 15:10:00 +08:00
crazywhalecc
02713fafb5 Enhance package management in CraftCommand by merging craft-level packages and shared extensions into build options 2026-04-29 15:09:21 +08:00
crazywhalecc
269cd600f8 Refactor documentation structure and add new artifact model guide 2026-04-29 14:28:17 +08:00
crazywhalecc
3c4f39735e artifact 2026-04-27 10:15:22 +08:00
crazywhalecc
523335fc35 trigger 2026-04-23 15:05:12 +08:00
crazywhalecc
c8dbd19ba2 Update latest docs 2026-04-23 14:11:44 +08:00
crazywhalecc
860ff38dae Update latest docs 2026-04-23 14:09:20 +08:00
Jerry Ma
3583cbe119 [v3] docs update: guide part (#1112) 2026-04-20 14:38:21 +08:00
crazywhalecc
13e2d0c969 Test deploy 2026-04-20 14:36:18 +08:00
crazywhalecc
8ff90dbb7d Add tag-based trigger 2026-04-20 14:27:35 +08:00
crazywhalecc
ecaebe0054 Add v2 version warning message 2026-04-20 14:19:39 +08:00
crazywhalecc
4a9087c35c Add netlify config 2026-04-20 14:08:52 +08:00
crazywhalecc
4abbc1c9ac Add gen-meta node option 2026-04-20 13:57:17 +08:00
crazywhalecc
c39155898a Add deps-map component and related command 2026-04-20 11:30:40 +08:00
crazywhalecc
05900c2d6c Remove patch point 2026-04-20 11:29:16 +08:00
crazywhalecc
69d4c16fcb Remove v2 docs 2026-04-19 18:08:35 +08:00
crazywhalecc
2045055591 Add GUIDE section for v3 docs 2026-04-19 18:01:56 +08:00
crazywhalecc
a348e838d7 Temp 2026-04-19 11:49:55 +08:00
crazywhalecc
a175c5862d Update index 2026-04-16 14:40:45 +08:00
crazywhalecc
e3b07d701e Remove unused fail download elements 2026-04-16 14:32:29 +08:00
crazywhalecc
3ff0742ff1 Enhance error handling in artifact downloading process 2026-04-16 14:08:06 +08:00
crazywhalecc
182f4ee0d0 Too new, too new 2026-04-13 12:56:02 +08:00
crazywhalecc
e22e615ba4 Upgrade actions/upload-artifact to v8 in build and test workflows 2026-04-13 12:27:52 +08:00
crazywhalecc
4413529d83 Update to v5 2026-04-13 11:30:03 +08:00
crazywhalecc
8e970f37dc Use versioned spc-bin and latest spc-bin 2026-04-13 11:26:11 +08:00
crazywhalecc
764894e930 Use dev:info instead of dev:extensions 2026-04-13 11:19:54 +08:00
crazywhalecc
f6f7b629e3 Disable v2 workflows temporarily 2026-04-13 11:17:55 +08:00
crazywhalecc
165372d17b Add OS support for Linux and Darwin in memcache and memcached configurations 2026-04-13 11:04:43 +08:00
crazywhalecc
7b66a88af1 Add dump-extensions command 2026-04-13 10:47:34 +08:00
crazywhalecc
3816b94a9b Update README.md 2026-04-13 10:21:10 +08:00
Jerry Ma
79d0cd4d19 Update src/Package/Extension/swow.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 08:24:04 +08:00
Jerry Ma
d37e23218b Update src/Package/Artifact/attr.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 08:23:33 +08:00
Jerry Ma
9fc2b64b6b Update src/Package/Library/gettext.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-13 08:21:04 +08:00
Jerry Ma
e8b8abea47 [3.0] Add frankenphp single executable build for Windows (#1099) 2026-04-13 00:35:55 +08:00
crazywhalecc
5d76e0b6cb phpstan 2026-04-12 23:20:38 +08:00
crazywhalecc
8cc5c82595 Add frankenphp build 2026-04-12 23:17:50 +08:00
crazywhalecc
4ddc137eae Add clang finder for Windows 2026-04-12 23:17:33 +08:00
crazywhalecc
f8ed1aa86e Fix unpassed env for windows cmd 2026-04-12 23:17:16 +08:00
crazywhalecc
f4918ba92c Add pthreadVC3.lib for frankenphp 2026-04-12 23:13:30 +08:00
crazywhalecc
ffc677e4b3 chore 2026-04-12 23:13:07 +08:00
crazywhalecc
0dbbf7abb2 Allow all packages has output 2026-04-12 23:12:26 +08:00
crazywhalecc
be034b756b Allow detect static-bins for windows 2026-04-12 23:12:11 +08:00
crazywhalecc
60d206cac0 Add go-win 2026-04-12 23:11:53 +08:00
Jerry Ma
2e2548d3de V3 refactor/forward port decimal (#1098) 2026-04-12 16:45:01 +08:00
crazywhalecc
75a7b21a6f Add patch to ensure ext/json MINIT runs before ext/decimal on Windows static builds 2026-04-12 16:05:20 +08:00
crazywhalecc
24231f793a Enhance debug flag handling in Makefile for release builds 2026-04-12 16:05:06 +08:00
crazywhalecc
d2f007d4c4 Forward-port #1095 2026-04-12 14:17:53 +08:00
Jerry Ma
c505430187 [3.0] Remove v2 code from v3 branch (#1096) 2026-04-12 13:42:44 +08:00
crazywhalecc
cc713069c2 Remove unnecessary TODO mark 2026-04-12 13:36:12 +08:00
crazywhalecc
6ee4759444 PhPStAN fIX 2026-04-12 13:32:43 +08:00
crazywhalecc
f327dda615 Update composer 2026-04-12 13:29:16 +08:00
crazywhalecc
4671be623b Add v3 artifact test 2026-04-12 13:29:06 +08:00
crazywhalecc
661b0fe887 Remove v2 from v3 branch 2026-04-12 13:19:59 +08:00
Jerry Ma
564e204111 V3 refactor/craft (#1091) 2026-04-12 13:02:32 +08:00
crazywhalecc
bca1fb5410 Remove TODO.md 2026-04-12 13:01:34 +08:00
crazywhalecc
e7bf945b96 Forward-port #1094 2026-04-12 12:51:16 +08:00
crazywhalecc
8ee9d134b3 Add craft command 2026-04-12 01:12:53 +08:00
crazywhalecc
6976e9db96 Allow callback for removeDir 2026-04-12 01:12:32 +08:00
crazywhalecc
39a975dc90 Just skip sleep 2026-04-12 01:12:17 +08:00
crazywhalecc
4f1ed70c96 Move out callback 2026-04-12 01:11:59 +08:00
crazywhalecc
626bdc3509 Allow fallback to builder options 2026-04-12 01:11:48 +08:00
Jerry Ma
ec399052ed [3.0] Refactor windows extensions (#1073) 2026-04-11 15:01:25 +08:00
crazywhalecc
ae7552f5a2 Forward-port #1087 2026-04-11 00:45:31 +08:00
crazywhalecc
25891a8648 Add ext-mongodb for Windows 2026-04-11 00:39:30 +08:00
crazywhalecc
e83a997d0c Add ext-zstd for Windows 2026-04-10 21:09:46 +08:00
crazywhalecc
58eb769ddf Forward-port #1086 2026-04-10 20:37:40 +08:00
crazywhalecc
e33aff18cc Forward-port #1082 2026-04-10 20:37:25 +08:00
crazywhalecc
9fb1dcbe93 Merge branch 'main' into v3-refactor/win-exts 2026-04-10 16:27:16 +08:00
crazywhalecc
869c9a06e3 Add ext-maxminddb and libmaxminddb support on Windows 2026-04-10 16:25:24 +08:00
crazywhalecc
4ba565b461 Add ext-uv and libuv support on Windows 2026-04-10 16:15:13 +08:00
crazywhalecc
6ef012e204 Add ext-uv and libuv support on Windows 2026-04-10 16:15:07 +08:00
Jerry Ma
6e354b4c6a fix: icu-static-win, ext-swoole, krb5, sqlsrv with grpc (#1087) 2026-04-10 16:14:02 +08:00
crazywhalecc
864fa9d0eb Fix #1083 2026-04-10 16:09:35 +08:00
crazywhalecc
db8520d8f0 Change config 2026-04-10 15:56:39 +08:00
crazywhalecc
3808457b52 Add lz4 and ext-lz4 for Windows 2026-04-10 15:51:18 +08:00
crazywhalecc
d29bd12bcc Remove old support config 2026-04-10 15:36:21 +08:00
crazywhalecc
f46240b55e Remove old support config 2026-04-10 15:35:22 +08:00
crazywhalecc
35b23a532f Add ext-snappy and snappy support on Windows 2026-04-10 15:34:55 +08:00
crazywhalecc
323f1ec00e Use correct ext-xz arg-type 2026-04-10 15:33:52 +08:00
crazywhalecc
6b29d92579 Disable ext-snmp, ext-ldap on Windows 2026-04-10 15:33:31 +08:00
crazywhalecc
1320a74460 Add ext-trader 2026-04-10 15:32:50 +08:00
crazywhalecc
4c07bcc95f Allow xz build statically 2026-04-10 15:05:15 +08:00
crazywhalecc
a27f5cc8be Oops 2026-04-10 14:26:03 +08:00
crazywhalecc
26a14bccbe Disable iouring on glibc build 2026-04-10 14:21:06 +08:00
crazywhalecc
cf48d131b3 Use direct link to official release instead of mirror 2026-04-10 13:52:21 +08:00
crazywhalecc
544fd15c0b test tmate 2026-04-10 13:26:14 +08:00
crazywhalecc
b04b079267 test 2026-04-10 13:22:06 +08:00
crazywhalecc
da49c056c9 test 2026-04-10 12:49:10 +08:00
crazywhalecc
7fc5dd428d Fix krb5 CI build by the way 2026-04-10 12:24:25 +08:00
crazywhalecc
6b62255091 test 2026-04-10 12:21:21 +08:00
crazywhalecc
9d777ca650 fix(icu_static_win): update paths for ICU static libraries and includes 2026-04-09 23:37:36 +08:00
crazywhalecc
7e2cfe2950 Merge remote-tracking branch 'origin/v3-refactor/win-exts' into v3-refactor/win-exts 2026-04-09 19:11:32 +08:00
Marc
20f95efcba fix(xlswriter): fix macOS build with modern Clang (C23) (#1086) 2026-04-09 14:30:42 +07:00
crazywhalecc
1d0ccdec45 Refactor micro:combine command on v3 2026-04-09 15:16:44 +08:00
Marc
fb7730989c Apply suggestions from code review
Co-authored-by: Marc <m@pyc.ac>
2026-04-09 14:00:10 +07:00
Kévin Dunglas
4d2036f20e fix(xlswriter): use -std=gnu17 to fix K&R declarations rejected by C23
The bundled minizip in xlswriter has K&R C function declarations in
multiple files (mztools.c, ioapi.c). Apple Clang (Xcode 16+) defaults
to C23, which removed K&R from the standard, causing hard build errors.

Instead of patching individual files, downgrade the C standard to gnu17
for the whole build when xlswriter is enabled. This covers all K&R
occurrences in the bundled code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 08:49:49 +02:00
crazywhalecc
cd14f6253b Add ext-zip for Windows 2026-04-09 12:25:12 +08:00
crazywhalecc
28e102100f Refactor support for sysv extensions and tidy for Windows 2026-04-09 12:17:00 +08:00
crazywhalecc
e25d95c26b Add ext-soap for Windows 2026-04-09 12:16:30 +08:00
crazywhalecc
b45e64ec16 Add ext-swow for Windows 2026-04-09 12:15:56 +08:00
crazywhalecc
1a027003b1 Add libxslt for Windows 2026-04-09 12:15:45 +08:00
crazywhalecc
6ed35eaa85 Add tidy for Windows 2026-04-09 12:15:30 +08:00
crazywhalecc
f1bd64ec06 Add tidy for Windows 2026-04-09 12:15:24 +08:00
crazywhalecc
2256f47aed Add ext-readline for windows 2026-04-09 10:51:12 +08:00
crazywhalecc
631549073a Add wineditline 2026-04-09 10:50:59 +08:00
crazywhalecc
3805c06caa Limit posix to unix-only 2026-04-09 10:41:10 +08:00
crazywhalecc
402e105b6b Add ext-pgsql, ext-pdo_pgsql 2026-04-09 10:40:55 +08:00
crazywhalecc
39f6a628da Limit password-argon2, pcntl to unix only 2026-04-09 10:40:34 +08:00
crazywhalecc
6630fbdce8 Fix sqlsrv build configuration for Windows by removing /sdl, /W4, and /WX flags 2026-04-09 10:40:03 +08:00
crazywhalecc
4d73af45c2 Add ext-odbc, ext-pdo_odbc for windows 2026-04-09 10:19:53 +08:00
crazywhalecc
ee2e887625 Add ext-gd, ext-iconv, ext-intl for windows 2026-04-09 10:19:12 +08:00
crazywhalecc
1bee20ac61 Add Windows build configuration support for opcache extension 2026-04-09 10:07:21 +08:00
crazywhalecc
9b8e0c794a Update getBinaryExtractConfig to handle 'hosted' cache extraction path 2026-04-09 10:07:09 +08:00
Kévin Dunglas
105f0328e6 fix(xlswriter): convert K&R function declaration to ANSI C in bundled minizip
The bundled minizip in xlswriter (pinned at libxlsxwriter RELEASE_1.0.0)
uses a K&R-style function declaration in mztools.c. Modern Clang on macOS
(defaulting to C23) rejects this as a hard syntax error since K&R
declarations were removed from the C23 standard.

The upstream libxlsxwriter has already fixed this on their main branch.
This patch applies the same fix during the build process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 21:33:59 +02:00
crazywhalecc
2f260e4d09 Add moveFileOrDir method to handle cross-device file and directory moves 2026-04-08 22:14:55 +08:00
crazywhalecc
9182cf1e34 Add ext-glfw support for Windows 2026-04-08 22:14:37 +08:00
crazywhalecc
c207269998 Add php extension OS support checks to PackageInstaller 2026-04-08 22:13:59 +08:00
crazywhalecc
097af804a7 Add OS support checks to PhpExtensionPackage 2026-04-08 22:13:44 +08:00
crazywhalecc
a5a3a990bf Use legacy --enable-micro-win32 way to workaround 2026-04-08 22:13:21 +08:00
crazywhalecc
2bc0d05242 Add ext-gettext for Windows 2026-04-08 22:12:36 +08:00
crazywhalecc
d7ee946864 Add mpir for windows gmp support 2026-04-08 22:12:13 +08:00
crazywhalecc
9a0d239b58 Add gettext-win 2026-04-08 22:11:45 +08:00
crazywhalecc
ad631f9b6e Add pdo_sqlsrv, libyaml patches from v2 2026-04-08 14:49:38 +08:00
crazywhalecc
a3624b1510 Forward-port #1078, add sqlsrv and pdo_sqlsrv extension support for win 2026-04-08 11:22:45 +08:00
crazywhalecc
2a80d5a05d Merge branch 'main' into v3-refactor/win-exts 2026-04-08 11:17:40 +08:00
crazywhalecc
ee854eed41 Refactor extension configuration and improve Windows build support 2026-04-08 11:08:05 +08:00
crazywhalecc
921870eaea Update composer.lock 2026-04-08 10:08:24 +08:00
crazywhalecc
76fc5abfe7 Apply v2 patch for xlswriter 2026-04-08 10:04:07 +08:00
crazywhalecc
30c9a3f7a3 phpstan 2026-04-07 17:11:27 +08:00
crazywhalecc
baa21d6e94 Implement caching for config file parsing to improve performance 2026-04-07 17:10:33 +08:00
crazywhalecc
8e91e02806 Add suggestion for ext-yaml to improve YAML config file parsing 2026-04-07 17:09:05 +08:00
crazywhalecc
8fa27ae59c Enhance spc-debug script to support Xdebug profiling mode 2026-04-07 17:04:08 +08:00
crazywhalecc
028aa45c17 Merge remote-tracking branch 'origin/v3-refactor/win-exts' into v3-refactor/win-exts
# Conflicts:
#	src/Package/Target/php/windows.php
2026-04-06 13:16:55 +08:00
crazywhalecc
85b9f5e055 Refactor package resolution to filter only available build artifacts 2026-04-06 13:15:25 +08:00
crazywhalecc
f8d24e2b3a Refactor package resolution to filter only available build artifacts 2026-04-06 13:13:45 +08:00
crazywhalecc
991da260ba Enhance CMake configuration with dynamic linker flags for target packages 2026-04-06 13:06:25 +08:00
Jerry Ma
d411fac9a1 add framework coreservices to watcher library (#1082) 2026-04-04 20:05:47 +08:00
henderkes
ddb9e3e7e4 add framework coreservices to watcher library 2026-04-04 18:18:22 +07:00
Marc
fef361225a Fix file paths for SQLSRV (#1081) 2026-04-04 18:11:38 +07:00
crazywhalecc
0b2b1d51e1 Fix file paths for SQLSRV 2026-04-04 18:39:28 +08:00
Jerry Ma
820d77b8b2 [v2] Fix bunch of build bugs for Windows (#1078) 2026-04-03 19:58:57 +08:00
Jerry Ma
cd3eb3d41d Update src/globals/ext-tests/openssl.php 2026-04-03 19:53:23 +08:00
crazywhalecc
e5e6e26f67 Add cli, cgi, micro output 2026-04-03 17:42:30 +08:00
crazywhalecc
c671cfd13b Add cli, cgi, micro output 2026-04-03 16:33:57 +08:00
crazywhalecc
51b8a0cab5 Fix upx packing for win 2026-04-03 16:26:20 +08:00
crazywhalecc
fb8f8d4ef8 Correct openssl test script condition 2026-04-03 15:49:02 +08:00
crazywhalecc
1a476d0e80 Fix xcopy command in FileSystem.php by removing the 'v' flag 2026-04-03 15:34:56 +08:00
crazywhalecc
e5ad72214c Add brotli to curl (just workaround for transitive deps) 2026-04-03 14:18:13 +08:00
crazywhalecc
c339b900f8 Disable simd for libjpeg 2026-04-03 11:33:55 +08:00
crazywhalecc
852a0437bd Disable openssl for ngtcp2 temporarily 2026-04-03 11:03:22 +08:00
crazywhalecc
3ded9881e1 Disable openssl for ngtcp2 temporarily 2026-04-03 09:55:46 +08:00
crazywhalecc
08a6bf38a4 Remove zstd suggested libs for v2 (implemented on v3)
Anyway we don't support zstd windows build before
2026-04-02 18:04:03 +08:00
crazywhalecc
cae668a947 Remove zstd suggested libs for v2 (implemented on v3)
Anyway we don't support zstd windows build before
2026-04-02 17:59:15 +08:00
crazywhalecc
e592488d7a Add test 2026-04-02 16:34:51 +08:00
crazywhalecc
a7184d0411 Fix sqlsrv redundant cflags when building PHP 2026-04-02 16:32:43 +08:00
crazywhalecc
d316ea81e4 Merge branch 'main' into v3-refactor/win-exts
# Conflicts:
#	config/env.ini
2026-03-31 15:13:23 +08:00
crazywhalecc
b96586e4d3 Add curl extension and enhance Windows build process 2026-03-31 15:10:47 +08:00
Marc
d535e4f102 libjpeg-turbo mustn't compile zlib symbols on its own (#1077) 2026-03-30 10:08:49 +07:00
henderkes
5a5f54bdcd brilliant to test php 8.1 2026-03-30 01:37:08 +07:00
henderkes
8f7897e13b test 2026-03-30 01:06:31 +07:00
henderkes
daae5f2a7c libjpeg-turbo mustn't compile zlib symbols on its own 2026-03-30 00:56:51 +07:00
crazywhalecc
844bb69f0d Fix ext-curl implementation 2026-03-27 22:30:39 +08:00
Marc
766f7fa34f hard code protobuf version while we're on v2 (#1075) 2026-03-26 12:37:32 +07:00
henderkes
ecf712b2b7 hard code protobuf version while we're on v2 2026-03-26 12:32:27 +07:00
crazywhalecc
94dd44e68d Add ext-amqp 2026-03-24 18:58:12 +08:00
crazywhalecc
2fa07700ef Fix zlib extension wrong arg 2026-03-24 18:55:04 +08:00
crazywhalecc
13a15b1a5a Use alpha1 as version number 2026-03-24 15:31:15 +08:00
Jerry Ma
d2c7fee8fa [3.0] Refactor windows libs (#1067) 2026-03-24 15:28:27 +08:00
crazywhalecc
9cd3125544 Patch configure script to include liblber for ldap dependency 2026-03-24 14:41:46 +08:00
crazywhalecc
590a94a723 Fix cli checks caused php testing fail 2026-03-24 14:41:32 +08:00
crazywhalecc
b625d80dc0 Fix tar command for unix 2026-03-24 13:30:17 +08:00
crazywhalecc
93c099dd31 Add xz 2026-03-24 12:31:45 +08:00
crazywhalecc
fcd0052d12 Add sqlite 2026-03-24 12:31:31 +08:00
crazywhalecc
6c52451c6c Add qdbm 2026-03-24 12:18:06 +08:00
crazywhalecc
175567fd11 Add missing postgresql license 2026-03-24 12:13:42 +08:00
crazywhalecc
bf05af7e16 Add pthreads4w 2026-03-24 12:13:22 +08:00
crazywhalecc
7c3022b7e3 Add postgresql (replace postgresql-win) 2026-03-24 12:07:57 +08:00
crazywhalecc
2a50015c12 Add download options for install-pkg command 2026-03-24 12:07:02 +08:00
crazywhalecc
1f42f1a479 Add libzip 2026-03-24 10:52:13 +08:00
crazywhalecc
41f5948392 Add libyaml 2026-03-23 17:11:47 +08:00
crazywhalecc
6d91f8b2d3 Add patch description for Windows static linking in libsodium 2026-03-23 17:11:37 +08:00
crazywhalecc
141c737380 Add libsodium 2026-03-23 16:50:13 +08:00
Jerry Ma
d35cbd7bf8 Add Windows builders for libaom and brotli (#1072) 2026-03-23 16:21:46 +08:00
crazywhalecc
d076df6b04 Bump version number 2026-03-23 16:21:24 +08:00
crazywhalecc
a99b6bebae Remove freetype useless lib suggestions 2026-03-23 16:08:09 +08:00
crazywhalecc
af97263596 Forward-port #1070 2026-03-22 20:19:31 +08:00
Hendrik Mennen
864678ab46 Merge branch 'main' into feat/windows-libaom-brotli 2026-03-22 13:12:47 +01:00
Hendrik Mennen
c03508a84b Improve zlib Windows library detection for future zlib versions (#1070)
Co-authored-by: Hendrik Mennen <hmennen@gambio.ec1.de>
2026-03-22 20:11:29 +08:00
Hendrik Mennen
963e2a084a Add Windows builders for libaom and brotli libraries
Both libraries are listed in lib.json and used as transitive dependencies
(libaom via libavif, brotli via freetype/curl) but had no Windows builder,
causing builds to fail with "library [X] is in the lib.json list but not
supported to compile".

libaom: Uses builddir instead of build to avoid collision with the
source tree's build/cmake/ directory. Matches the Unix builder's
AOM_TARGET_CPU=generic setting for portability.

brotli: Standard CMake build with shared libs and tools disabled.

Also adds static-libs-windows entry for libaom in lib.json.
2026-03-22 09:07:47 +01:00
crazywhalecc
508cfa67e5 Make openssl build faster 2026-03-21 18:43:05 +08:00
crazywhalecc
08dca4253d Add librabbitmq 2026-03-21 18:42:34 +08:00
crazywhalecc
e4434643ff Add jom to reduce openssl building time 2026-03-21 18:41:57 +08:00
crazywhalecc
adff728999 Add libffi-win 2026-03-21 18:04:15 +08:00
crazywhalecc
9af132d67e Add missing icu license file 2026-03-21 18:03:14 +08:00
crazywhalecc
a950f3d716 Add libaom 2026-03-21 17:54:34 +08:00
crazywhalecc
33f33439d1 Add libavif 2026-03-21 17:54:21 +08:00
crazywhalecc
36177e4948 Add libjpeg 2026-03-21 17:54:07 +08:00
crazywhalecc
801d41efeb Add libwebp 2026-03-21 17:53:49 +08:00
crazywhalecc
43d8c9d9d6 Add icu (replace old icu-static-win) 2026-03-21 12:44:17 +08:00
crazywhalecc
75dd01aa91 Enhance package download logic to handle binary-only packages and improve error messaging for installation failures 2026-03-21 12:43:39 +08:00
crazywhalecc
bf4d227a55 Add error handling for missing vswhere.exe in WindowsUtil 2026-03-21 12:42:47 +08:00
crazywhalecc
520767638f Add gmssl 2026-03-21 11:20:05 +08:00
crazywhalecc
5ff973e446 Add freetype 2026-03-21 11:12:24 +08:00
crazywhalecc
230be2ebe8 Add libpng 2026-03-21 11:12:13 +08:00
crazywhalecc
bd73b4a6dc phpstan 2026-03-21 00:34:31 +08:00
crazywhalecc
327bb8bc0f Add curl 2026-03-21 00:33:27 +08:00
crazywhalecc
deb979416f Add libiconv-win 2026-03-21 00:33:04 +08:00
crazywhalecc
f6e00c67cc Refactor LibraryPackage to skip pkg-config and static-bin checks on Windows 2026-03-21 00:32:02 +08:00
crazywhalecc
7df861696d Add libxml2 2026-03-21 00:31:45 +08:00
crazywhalecc
92861669c2 Add nghttp2 2026-03-21 00:31:30 +08:00
crazywhalecc
893f640469 Add nghttp3 2026-03-21 00:31:16 +08:00
crazywhalecc
eff7037e74 Add ngtcp2, remove suggested libs 2026-03-21 00:31:02 +08:00
crazywhalecc
1213cb578e Refactor WindowsUtil to cache Visual Studio search results and add CMake find modules 2026-03-21 00:30:30 +08:00
crazywhalecc
d1ec473f21 Allow set current working dir 2026-03-21 00:30:15 +08:00
crazywhalecc
19bfb6bc83 Add zstd 2026-03-21 00:29:35 +08:00
crazywhalecc
94c579a453 Add libssh2 2026-03-20 21:48:46 +08:00
crazywhalecc
d7d41f4d89 Add openssl 2026-03-20 21:47:27 +08:00
Marc
4c6b7a3d55 fix libde265 on ancient debian OS (#1064) 2026-03-20 19:48:01 +07:00
Marc
5404926a14 Merge branch 'main' into fix/lide265 2026-03-20 19:47:47 +07:00
Nils Silbernagel
295df19484 Add shared-extensions, frankenphp and zts to build-unix workflow (#1062)
Co-authored-by: crazywhalecc <jesse2061@outlook.com>
2026-03-20 20:37:25 +08:00
Jerry Ma
b970bf8e3a Fix gd build on PHP 8.5 (#1043) 2026-03-20 20:00:42 +08:00
Jerry Ma
54915028d7 Fix zlib produced lib file names from different zlib version (#1066) 2026-03-20 19:35:51 +08:00
crazywhalecc
03cd7e141c Add brotli libs 2026-03-20 18:09:29 +08:00
crazywhalecc
9f3e353699 Add bzip2 2026-03-20 18:04:30 +08:00
crazywhalecc
b21d5716e1 Add onig 2026-03-20 18:04:18 +08:00
crazywhalecc
464ddeb29d Fix file copy operation to handle identical source and destination paths 2026-03-20 18:03:58 +08:00
crazywhalecc
0c389d9069 Add zlib 2026-03-20 18:03:46 +08:00
crazywhalecc
1d2916fa8f Add brotli 2026-03-20 16:16:29 +08:00
crazywhalecc
46132ee1c8 Fix doctor lock path on Windows 2026-03-20 16:16:09 +08:00
crazywhalecc
3c9e868ce1 Add spc-debug script on Windows 2026-03-20 16:08:58 +08:00
crazywhalecc
c5efcc0c93 Fix wrongly using msys2 tar.exe 2026-03-20 16:07:28 +08:00
Jerry Ma
64d692e105 [3.0] Refactor extensions (#1038) 2026-03-20 16:05:35 +08:00
crazywhalecc
dc79ac9c9a Correct doctor fix 2026-03-20 11:32:15 +08:00
crazywhalecc
e9be3a41db Add homebrew llvm version toolchain support 2026-03-20 11:20:42 +08:00
Jerry Ma
00649d816e [3.0] Refactor new extensions (#1051) 2026-03-20 10:54:29 +09:00
crazywhalecc
11376cc6ad Use env and path injection instead of old style 2026-03-20 09:31:43 +08:00
crazywhalecc
c6207d8c7c Fix interactive install-pkg command 2026-03-20 09:31:24 +08:00
crazywhalecc
b0eff0ba6e Add protoc target 2026-03-20 09:31:05 +08:00
crazywhalecc
9d748a6e08 Add rust target 2026-03-20 09:30:52 +08:00
crazywhalecc
b0522205da Add support for package environment variables and path injection 2026-03-20 09:30:34 +08:00
crazywhalecc
beeb0b8721 Handle failure in fetching Zig version index 2026-03-20 09:29:45 +08:00
henderkes
823fe96942 attempt 2026-03-18 23:26:57 +07:00
henderkes
f2fa29809a why is it not failing here? 2026-03-18 18:37:16 +07:00
Marc
463ec546fa Merge branch 'main' into fix/lide265 2026-03-18 15:51:03 +07:00
crazywhalecc
9e2a5ce188 Add target htop 2026-03-18 15:01:06 +08:00
crazywhalecc
0b0ecd17c3 Allow curl building static executable 2026-03-18 15:00:58 +08:00
crazywhalecc
c81146bf18 Add ncursesw 2026-03-18 15:00:44 +08:00
crazywhalecc
c1f2fd49a6 Add ext-imap 2026-03-18 13:30:29 +08:00
henderkes
60b2aea09e fix libde265 on ancient debian OS? 2026-03-18 11:57:27 +07:00
crazywhalecc
1ee8bc7d34 Add ext-swow 2026-03-18 12:36:22 +08:00
crazywhalecc
a24fae7a55 Add ext-swoole 2026-03-18 12:07:39 +08:00
crazywhalecc
b5b917ce32 Fix zig-cc strlcpy missing issue with swoole+openssl 2026-03-18 12:07:19 +08:00
crazywhalecc
b1a59dad79 Make PhpExtensionPackage::getSharedExtensionLoadString public 2026-03-18 12:06:48 +08:00
crazywhalecc
98a618f1cd Add ext-yaml 2026-03-17 15:54:11 +08:00
crazywhalecc
738c61b682 Add ext-zstd 2026-03-17 15:50:12 +08:00
crazywhalecc
83c266a713 Add ext-yac 2026-03-17 15:41:00 +08:00
crazywhalecc
0a60ebad17 Add ext-xz 2026-03-17 15:30:54 +08:00
crazywhalecc
0101e6c52b Add ext-xsl 2026-03-17 15:23:20 +08:00
crazywhalecc
63bee0db13 Add ext-xmlwriter,ext-xmlreader 2026-03-17 15:21:16 +08:00
crazywhalecc
154adc1f48 Add ext-xlswriter 2026-03-17 15:13:59 +08:00
crazywhalecc
5d309ee998 Add ext-zip 2026-03-17 15:13:47 +08:00
crazywhalecc
ca15ccd4d1 Add ext-xhprof 2026-03-17 13:27:37 +08:00
crazywhalecc
20b693d1fa Add ext-xdebug 2026-03-17 13:16:47 +08:00
crazywhalecc
2327f32e41 Add ext-uv 2026-03-17 13:04:19 +08:00
crazywhalecc
22c5403e98 Allow unstable for PECL downloads 2026-03-17 12:57:43 +08:00
crazywhalecc
25bec6b974 Add ext-uuid 2026-03-17 12:30:02 +08:00
crazywhalecc
deef11c86a Add ext-trader 2026-03-17 12:27:14 +08:00
crazywhalecc
bfb6fcd436 Add ext-tokenizer 2026-03-17 11:27:47 +08:00
crazywhalecc
170371abf7 Add ext-tidy 2026-03-17 11:27:16 +08:00
crazywhalecc
02d40d197b Add ext-sysvmsg,ext-sysvsem,ext-sysvshm 2026-03-17 11:25:18 +08:00
crazywhalecc
b89e941ab2 Add ext-ssh2 2026-03-17 11:24:57 +08:00
crazywhalecc
65c3263b25 Add ext-spx 2026-03-16 16:59:27 +08:00
crazywhalecc
d79128cdbf Add ext-sodium 2026-03-16 16:57:51 +08:00
crazywhalecc
ba253ea2a5 Add ext-soap 2026-03-16 16:57:43 +08:00
crazywhalecc
21e2a0194c Add ext-snmp 2026-03-16 16:48:50 +08:00
crazywhalecc
3f812fe5fc Fix filename generation for GitHub tarballs to handle missing tag names 2026-03-16 16:48:26 +08:00
crazywhalecc
1670b61ed7 Add ext-snappy 2026-03-16 16:26:53 +08:00
crazywhalecc
15e7678615 Add missing xml-related patches for windows 2026-03-16 16:17:53 +08:00
crazywhalecc
fe302bf8b9 Add ext-simplexml 2026-03-16 16:17:15 +08:00
crazywhalecc
e30a10f60f Add ext-simdjson, add SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS env var 2026-03-16 16:04:35 +08:00
crazywhalecc
271013f2d6 Add ext-shmop, fix path slashes 2026-03-13 17:02:35 +08:00
crazywhalecc
6ed620683f Add ext-redis 2026-03-13 16:53:28 +08:00
crazywhalecc
935fbbd31a Add ext-rdkafka 2026-03-13 10:14:05 +08:00
crazywhalecc
a288533fc3 Add ext-rar 2026-03-12 22:58:59 +08:00
crazywhalecc
067749ab1b Add ext-protobuf 2026-03-12 22:44:57 +08:00
crazywhalecc
63d28bdc01 Add ext-posix 2026-03-12 22:33:28 +08:00
crazywhalecc
54e301d55c Add ext-sqlsrv,ext-pdo_sqlsrv 2026-03-12 22:32:36 +08:00
crazywhalecc
6af55323b3 Add ext-sqlite3,ext-pdo_sqlite 2026-03-12 22:27:42 +08:00
crazywhalecc
f85f29e628 Add ext-pgsql,ext-pdo_pgsql 2026-03-12 22:22:02 +08:00
crazywhalecc
74865025bd Add ext-pcntl,ext-pdo,ext-pdo_mysql,ext-pdo_odbc 2026-03-12 22:06:42 +08:00
crazywhalecc
7a690fd9a3 Add ext-pcov 2026-03-12 22:06:11 +08:00
crazywhalecc
e9023520de Merge remote-tracking branch 'origin/v3-refactor/new-extensions' into v3-refactor/new-extensions 2026-03-12 21:56:35 +08:00
crazywhalecc
9d65c491e7 Add ext-password-argon2 2026-03-12 21:56:28 +08:00
crazywhalecc
9713b76935 Add patch to modify info.c for release builds to hide configure command 2026-03-12 17:09:59 +08:00
crazywhalecc
cbc8feebfd Add patch for SPC_MICRO_PATCHES and update configure.ac handling 2026-03-12 16:54:01 +08:00
crazywhalecc
32bdacd5a5 Add ext-parallel 2026-03-12 16:04:25 +08:00
crazywhalecc
528469514b Add ext-opentelemetry 2026-03-12 15:38:56 +08:00
crazywhalecc
371a1af572 Add ext-opcache 2026-03-12 15:08:11 +08:00
crazywhalecc
6f372a74a2 Remove check for php_micro.c file existence in SourcePatcher 2026-03-12 15:08:02 +08:00
crazywhalecc
c7f611fe80 Add ext-odbc 2026-03-12 14:33:39 +08:00
crazywhalecc
54f53fd104 Add ext-mysqlnd_parsec 2026-03-12 14:29:05 +08:00
crazywhalecc
91ee94f349 Add ext-mongodb 2026-03-12 14:19:38 +08:00
crazywhalecc
e523fff0ab Add ext-mysqlnd_ed25519 2026-03-11 17:12:27 +08:00
crazywhalecc
13ab3e2b6c Fix transitive extension dependency not enabled bug 2026-03-11 17:10:48 +08:00
crazywhalecc
32bb0aadce Add ext-mysqli,ext-mysqlnd 2026-03-11 16:37:25 +08:00
crazywhalecc
59a8b65f6f Add ext-memcache,ext-msgpack 2026-03-11 16:14:05 +08:00
Marc
4625c6a885 update default php version to 8.5 (#1058) 2026-03-11 15:09:07 +07:00
crazywhalecc
f35f133115 Add ext-memcache 2026-03-11 15:29:00 +08:00
crazywhalecc
cbfeefc808 Add ext-inotify 2026-03-11 15:12:21 +08:00
henderkes
85b0cd8b4b only disable when building ftp static, shared is fine 2026-03-11 13:54:24 +07:00
henderkes
1fcb74ad9b swoole-ftp conflicts with ftp 2026-03-11 13:42:38 +07:00
henderkes
1049a3ce66 curl is always supported now (swoole no longer supports php < 8.1) 2026-03-11 10:32:58 +07:00
henderkes
1b8b53d47f update swoole args for 6.2 2026-03-11 10:19:08 +07:00
henderkes
a232f578a4 test bulk 2026-03-11 10:11:39 +07:00
crazywhalecc
f6a9dac504 Fix grpc build error with RPATH 2026-03-11 11:07:25 +08:00
henderkes
70285cb53b actually update to 8.5 2026-03-11 09:48:50 +07:00
henderkes
a335d050cf cs fix 2026-03-11 09:46:41 +07:00
henderkes
ef4b2997a7 test 2026-03-11 09:45:56 +07:00
henderkes
901da8fa41 remove ldtl from odbc libs private (using built in ltdl) 2026-03-11 09:43:02 +07:00
henderkes
e49a5d7a50 make php 8.5 default 2026-03-11 09:42:39 +07:00
crazywhalecc
0719c45a29 Merge remote-tracking branch 'origin/v3-refactor/new-extensions' into v3-refactor/new-extensions
# Conflicts:
#	config/pkg/ext/builtin-extensions.yml
2026-03-11 09:41:17 +08:00
crazywhalecc
f414bd289c Add ext-maxminddb 2026-03-11 08:18:25 +08:00
crazywhalecc
fa7de0642a Add ext-lz4 2026-03-10 22:47:37 +08:00
crazywhalecc
c5b11f47c3 Add ext-libxml 2026-03-10 22:41:33 +08:00
crazywhalecc
d8dda09fb6 Add ext-ldap 2026-03-10 22:38:34 +08:00
crazywhalecc
f83565b058 Add ext-intl 2026-03-10 22:25:11 +08:00
crazywhalecc
e31aeabf12 Add ext-imagick 2026-03-10 22:19:01 +08:00
crazywhalecc
d7eb33ff1e Forward-port #1057 2026-03-10 22:01:23 +08:00
Jerry Ma
281b958075 Fix grpc build (#1055) 2026-03-10 20:35:51 +09:00
Marc
e31f64864e fix: FrankenPHP build args (#1057) 2026-03-10 18:13:34 +07:00
Kévin Dunglas
92f5b56c74 fix: FrankenPHP build args 2026-03-10 11:57:23 +01:00
crazywhalecc
1400dc649f Add ext-session 2026-03-10 16:59:54 +08:00
crazywhalecc
e73bad9d23 Add ext-igbinary 2026-03-10 16:59:48 +08:00
crazywhalecc
2d906a8145 Add ext-iconv 2026-03-10 16:56:09 +08:00
crazywhalecc
bc26e3d37c Add ext-gmssl 2026-03-10 16:52:36 +08:00
crazywhalecc
e0d2ee91f7 Add ext-gmp 2026-03-10 16:52:29 +08:00
crazywhalecc
465549f97d Forward-port #1056 on v3 2026-03-10 16:41:01 +08:00
Jerry Ma
2350d2d5ca Merge branch 'main' into fix/grpc-build 2026-03-10 14:52:21 +09:00
crazywhalecc
086c855a43 Use custom config.m4 for grpc extension 2026-03-10 13:49:53 +08:00
crazywhalecc
4fa5292913 Use custom config.m4 for grpc extension 2026-03-10 13:49:34 +08:00
crazywhalecc
b89a29d5f3 Add ext-grpc 2026-03-10 13:37:09 +08:00
Marc
9634b8bcda set custom binary name for frankenphp, allow linking against system openssl (fix mssql issues) (#1056) 2026-03-10 11:11:36 +07:00
Marc
5d5a50a33c Update src/SPC/builder/LibraryBase.php
Co-authored-by: Jerry Ma <jesse2061@outlook.com>
2026-03-10 10:57:49 +07:00
henderkes
1edf14e642 set custom binary name for frankenphp 2026-03-10 08:52:15 +07:00
henderkes
2277390a1a fix removeConfigureArgs in UnixAutoconfExecutor.php 2026-03-10 08:49:56 +07:00
henderkes
f93ad27c17 allow using some libs as system provided (work around mssql linking vs system openssl) 2026-03-10 08:47:38 +07:00
henderkes
b690566b39 simplify rm command 2026-03-10 08:43:48 +07:00
henderkes
16e772e1a8 add back in zig workaround as 0.16.x is not released yet 2026-03-10 08:42:17 +07:00
crazywhalecc
ad356b4a23 Fix grpc build 2026-03-09 20:12:14 +08:00
crazywhalecc
404195a38b Add ext-gmssl 2026-03-09 16:30:35 +08:00
crazywhalecc
7856f7e03a Add ext-gmp 2026-03-09 16:30:00 +08:00
crazywhalecc
4a572a1372 Add ext-gettext 2026-03-09 15:59:27 +08:00
crazywhalecc
61d50cd28b Add ext-gd 2026-03-09 15:55:01 +08:00
crazywhalecc
38715bba21 Add ext-fileinfo,ext-filter,ext-ftp 2026-03-09 15:29:38 +08:00
crazywhalecc
8fdfcf8fcd Fix suggested extensions not passing when using --with-suggests 2026-03-09 15:29:12 +08:00
crazywhalecc
659b75cedd Remove redundant dependency for specific virtual target (php-fpm) 2026-03-09 15:18:03 +08:00
crazywhalecc
cf2e1d9819 Add ext-ffi 2026-03-09 15:13:07 +08:00
crazywhalecc
b226887bd2 Add ext-exif 2026-03-09 15:02:23 +08:00
crazywhalecc
552a8a1ea2 Add ext-excimer (closes #1019) 2026-03-09 15:00:06 +08:00
crazywhalecc
a678d908d5 Add ext-event 2026-03-09 14:45:36 +08:00
crazywhalecc
8cc5877f3c Add ext-ev,ext-sockets 2026-03-09 14:35:42 +08:00
crazywhalecc
b185d27ad7 Add ext-ds 2026-03-09 14:30:48 +08:00
Jerry Ma
dc0b3b8cec Merge branch 'v3-refactor/extensions' into v3-refactor/new-extensions 2026-03-09 12:10:57 +09:00
Jerry Ma
705435eccb [3.0] Add check-update command and CheckUpdateInterface for artifacts (#1044) 2026-03-09 12:10:22 +09:00
crazywhalecc
77e129881a Move all interactive input to construct 2026-03-09 11:04:18 +08:00
crazywhalecc
1f768ffc64 Mark transitive PHP extension dependencies of static extensions as static 2026-03-08 22:33:44 +08:00
crazywhalecc
424228d81e Add ext-dom, ext-xml 2026-03-08 22:33:00 +08:00
crazywhalecc
b90356bc1d Enhancement for bin/spc dev:info command 2026-03-08 17:47:09 +08:00
crazywhalecc
247a254af4 Add ext-dio 2026-03-08 17:46:14 +08:00
crazywhalecc
6d2c43d3e5 Add license metadata for ast extension 2026-03-08 16:43:53 +08:00
crazywhalecc
a9e6e4a226 Add dba 2026-03-08 16:32:31 +08:00
crazywhalecc
ad0118718f Update arg-type definition in builtin-extensions.yml to include specific options 2026-03-08 14:02:22 +08:00
crazywhalecc
8f10e0d070 Add before and after build hooks for phar extension to replace file strings 2026-03-08 14:02:15 +08:00
crazywhalecc
0c86d82b98 Update getDistName method to use display-name from config 2026-03-08 14:02:04 +08:00
crazywhalecc
2676875ccd Refactor PKG_CHECK_MODULES replacement and reuse make vars for configure 2026-03-08 14:01:44 +08:00
crazywhalecc
19d6d669c0 Move arg-type def in config 2026-03-08 14:01:29 +08:00
crazywhalecc
88af4a719f Prefer cache extract path in getSourceDir method 2026-03-08 14:00:33 +08:00
crazywhalecc
b0b3220716 Fix zlib configure arg 2026-03-08 14:00:15 +08:00
crazywhalecc
5669642cf3 Merge branch 'main' into v3-refactor/new-extensions
# Conflicts:
#	src/SPC/store/SourcePatcher.php
2026-03-07 21:30:02 +08:00
crazywhalecc
0548aba248 Add ext-curl 2026-03-07 21:20:34 +08:00
crazywhalecc
07fd1bcd03 Patch extension config.m4 files to use PKG_CHECK_MODULES_STATIC 2026-03-07 00:42:49 +08:00
crazywhalecc
780232fa60 Enhance dependency resolution for virtual-target packages 2026-03-07 00:42:34 +08:00
crazywhalecc
fbbed6d5c1 Add ext-ctype 2026-03-06 19:27:22 +08:00
crazywhalecc
fc807ec7c9 Add ext-calendar 2026-03-06 19:24:48 +08:00
crazywhalecc
58c02dfab3 Add ext-bz2 2026-03-06 19:23:08 +08:00
crazywhalecc
5e84fed19a Add ext-brotli 2026-03-06 19:22:59 +08:00
crazywhalecc
d0b6a02432 Add patchBeforeBuild method to modify Makefile CFLAGS and enhance build process 2026-03-06 19:20:55 +08:00
crazywhalecc
368ce75261 Fix configuration retrieval by using the extension's name instead of a formatted version 2026-03-06 19:20:16 +08:00
crazywhalecc
32b7fee8d8 Fix version extraction to fallback on repository name if tag name is absent 2026-03-06 16:32:44 +08:00
Jerry Ma
8c4e3d58a3 Add php-src mirror and use gmp mirror site (#1048) 2026-03-06 15:25:38 +09:00
Marc
8a51d64685 Add condition for ffi patch (#1050) 2026-03-06 12:59:23 +07:00
crazywhalecc
055bc7bc3c Add condition for ffi patch 2026-03-06 13:46:55 +08:00
crazywhalecc
84f6dab882 Add parallel update checking and improve artifact update handling 2026-03-05 11:11:31 +08:00
crazywhalecc
abdaaab6e6 Refactor CheckUpdateResult logic to simplify version comparison 2026-03-05 11:11:02 +08:00
crazywhalecc
5298ee4f97 Use constant back due to config validation problem 2026-03-05 08:21:44 +08:00
crazywhalecc
94fb7a643e Merge remote-tracking branch 'origin/v3-feat/check-update' into v3-feat/check-update 2026-03-05 08:18:00 +08:00
crazywhalecc
715f33ac4d Add log filtering to prevent sensitive data leakage 2026-03-05 08:17:41 +08:00
crazywhalecc
f7277cc012 Improve output formatting for update checks in CheckUpdateCommand 2026-03-05 08:17:13 +08:00
crazywhalecc
00c08e0c0c Use no optional libs for libxml2 2026-03-05 08:11:41 +08:00
crazywhalecc
671ebd2582 Use gmp mirror site 2026-03-04 16:32:49 +08:00
crazywhalecc
12d4009a21 Update PHP release handling to use configurable mirror and improve URL management 2026-03-04 16:32:16 +08:00
crazywhalecc
dc0a80975f Add PECL download type and support for PECL artifacts 2026-03-04 14:23:46 +09:00
crazywhalecc
174ef3dba7 Refactor ReturnCode constants for clarity and consistency 2026-02-28 15:36:04 +08:00
crazywhalecc
4f2ca17bde cs fix 2026-02-28 15:16:31 +08:00
crazywhalecc
029f8efa12 Avoid empty output 2026-02-28 14:55:18 +08:00
crazywhalecc
7cedd45567 Merge remote-tracking branch 'origin/v3-feat/check-update' into v3-feat/check-update 2026-02-28 14:36:04 +08:00
crazywhalecc
28f4a5c523 Add support for custom source check-update callbacks in artifacts 2026-02-28 14:35:48 +08:00
Jerry Ma
6ef5e9e067 Update src/StaticPHP/Artifact/Downloader/Type/CheckUpdateInterface.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-28 14:18:32 +08:00
Jerry Ma
64b0e72908 Update src/StaticPHP/Artifact/Downloader/Type/PIE.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-28 14:17:48 +08:00
Jerry Ma
a7b04d9081 Update src/StaticPHP/Artifact/Downloader/Type/Git.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-28 14:16:57 +08:00
crazywhalecc
0a07f6b27c cs fix 2026-02-28 14:07:05 +08:00
crazywhalecc
550f6cad60 Replace RuntimeException with DownloaderException for Go version retrieval failure 2026-02-28 14:02:32 +08:00
crazywhalecc
40e36982d3 Add custom binary check-update support for artifacts 2026-02-28 13:55:52 +08:00
crazywhalecc
ed5a516004 Implement check-update functionality for artifacts and enhance download result handling 2026-02-28 13:44:23 +08:00
crazywhalecc
2d550a8db4 Add simple output handling to exception classes 2026-02-28 13:43:28 +08:00
crazywhalecc
d316684995 Add optional package support for libaom, libsharpyuv, libjpeg, libxml2, and libpng in Unix build 2026-02-28 10:37:38 +08:00
crazywhalecc
c218aef947 Add doctor cache check and version management to ensure environment validation 2026-02-28 10:32:50 +08:00
crazywhalecc
7623b9e673 Deprecate '--debug' option and update logging level handling 2026-02-28 09:47:51 +08:00
crazywhalecc
fa175963f9 Enable suggested libs by default in build configurations for Unix and Windows 2026-02-27 10:03:25 +08:00
crazywhalecc
8c7d113c2f Apply smoke test control option for frankenphp 2026-02-27 09:59:55 +08:00
crazywhalecc
b3d67b928a Add tryPatchMakefileUnix method to fix //lib path in Makefile for Linux builds 2026-02-27 09:54:40 +08:00
crazywhalecc
f9fe2adb1d Trim quotes from frankenphp app path to ensure valid directory check 2026-02-27 09:52:02 +08:00
crazywhalecc
28c82b811b Add PackageInfoCommand to display package configuration information and support status 2026-02-27 09:50:21 +08:00
crazywhalecc
cfce177070 Add beforeMakeUnix method to patch TSRM.h for musl TLS symbol visibility 2026-02-27 09:42:28 +08:00
crazywhalecc
d6ec0b7809 Remove aarch64 build fix for glibc 2.17 from patchBeforeBuild method in postgresql.php 2026-02-27 09:31:37 +08:00
crazywhalecc
0e80f29e61 Add DumpCapabilitiesCommand to output installable and buildable capabilities of packages 2026-02-27 09:27:19 +08:00
Jerry Ma
da1f348daa Update src/StaticPHP/Package/PhpExtensionPackage.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-27 09:18:28 +08:00
crazywhalecc
e9279940d7 Add DumpStagesCommand to dump package stages and their locations 2026-02-26 16:09:18 +08:00
crazywhalecc
bb257cffd6 Add extension apcu 2026-02-26 15:46:33 +08:00
crazywhalecc
3238c44745 Refactor FrankenPHP build and smoke test processes for Unix 2026-02-26 15:46:18 +08:00
crazywhalecc
a57b48fda6 Add macOS check to patchBeforePHPConfigure for explicit_bzero detection 2026-02-26 15:45:30 +08:00
crazywhalecc
0f012f267b Rename tracker file from .spc-tracker.json to .build.json 2026-02-26 15:45:16 +08:00
crazywhalecc
08595cca73 Add PatchDescription attribute to libacl for Unix FPM_EXTRA_LIBS fix 2026-02-26 15:45:06 +08:00
crazywhalecc
28bbdf5401 Merge branch 'main' into v3-refactor/extensions 2026-02-26 10:02:31 +08:00
crazywhalecc
a357510109 Add frankenphp building message for console output 2026-02-26 10:02:16 +08:00
Marc
7d7902e0e9 Update build flags for FrankenPHP in UnixBuilderBase (#1042) 2026-02-24 06:08:14 +07:00
Kévin Dunglas
2a8fa7d155 Update build flags for FrankenPHP in UnixBuilderBase 2026-02-23 16:29:43 +01:00
crazywhalecc
d495455902 Remove motd for lint-config command 2026-02-23 10:32:08 +08:00
crazywhalecc
471df00ea3 Use StaticPHP instead of static-php-cli 2026-02-19 23:07:17 +08:00
crazywhalecc
bc7ac812b1 phpstan, package display message enhance 2026-02-19 23:02:09 +08:00
crazywhalecc
bbab685247 Refactor exception handler to v3, use standard shell exitcode 2026-02-19 23:02:09 +08:00
crazywhalecc
ee5aabbe34 Add CMakeConfigureLog.yaml lookup 2026-02-19 23:02:09 +08:00
crazywhalecc
059f785e0d Remove redundant catch for downloader 2026-02-19 23:02:09 +08:00
crazywhalecc
2fdb0b406f Correct bootstrap 2026-02-19 23:02:09 +08:00
crazywhalecc
f1e9dd8de8 Fix box compile config for v3 2026-02-19 23:02:09 +08:00
crazywhalecc
1095807e5b Use yml instead 2026-02-19 23:02:09 +08:00
crazywhalecc
753fdd725e Add registry availability check 2026-02-19 23:02:09 +08:00
crazywhalecc
0be4e859f3 Avoid using glob in phar mode 2026-02-19 23:02:09 +08:00
crazywhalecc
7a3f10bd77 Make downloader configurable 2026-02-19 23:02:09 +08:00
crazywhalecc
508f635f01 Add permission copying to ArtifactExtractor 2026-02-19 23:02:09 +08:00
crazywhalecc
18434b68f6 Add frankenphp SAPI build support 2026-02-19 23:02:09 +08:00
Marc
67ef8f6608 fix redownloading go-xcaddy every time, version 2.8.3 (#1034) 2026-02-17 22:36:27 +07:00
henderkes
d83a597689 unquote the string in case a shell script passes it stupidly 2026-02-17 21:49:30 +07:00
henderkes
5623fed37f fix redownloading go-xcaddy every time 2026-02-17 21:05:18 +07:00
Marc
38140d115f libavif needs at least one encoder to work (#1033) 2026-02-17 19:59:46 +07:00
henderkes
98117c3a04 remove pre built 2026-02-17 19:58:03 +07:00
Marc
b01d3ce12c Merge branch 'main' into feat/avif-dec 2026-02-17 19:18:38 +07:00
henderkes
608c915e14 should depend on it instead 2026-02-17 19:14:29 +07:00
henderkes
c680299654 libavif needs at least one encoder to work 2026-02-17 19:12:19 +07:00
Marc
794ab16b32 add input with-suggested-libs for build command (#1032) 2026-02-16 18:38:35 +07:00
tricker
661723c99a change logs name
Co-authored-by: Marc <m@pyc.ac>
2026-02-16 12:26:49 +01:00
Yoram
d9834d05c6 upload debug logs on 'build php' failures 2026-02-16 11:35:42 +01:00
Yoram
9a53ef3498 add input with-suggested-libs for build command 2026-02-13 14:35:01 +01:00
Marc
f680731f9d fix: Postgres build with ancient libc (#1029) 2026-02-11 17:42:36 +01:00
Jerry Ma
0fe1442f7e Bump version from 2.8.0 to 2.8.2 2026-02-12 00:02:38 +08:00
Jerry Ma
1e4780397b Update test-extensions.php for PHP versions and extensions
Commented out older PHP versions and Windows 2025 in the test configuration. Updated the extensions to test for Linux and Darwin.
2026-02-11 23:32:19 +08:00
Kévin Dunglas
6b67cb90fc fix: Postgres build with ancient libc 2026-02-11 16:24:13 +01:00
Jerry Ma
82bf317911 Refactor Linux and macOS tool checks for improved error handling and command execution (#1025) 2026-02-06 21:17:19 +08:00
Jerry Ma
041b08f10f V3 fix/phpunit (#1024) 2026-02-06 17:02:36 +08:00
Jerry Ma
7c3ac484b3 v3-refactor: Implement v2 libs (#1021)
All the library build scripts for *nix has refactored to v3 now
2026-02-06 16:42:00 +08:00
crazywhalecc
5c7ab48718 Support define php extension arg-type in config 2026-02-06 16:38:03 +08:00
crazywhalecc
478b85879f Chore 2026-02-06 16:34:51 +08:00
crazywhalecc
cf5a946de1 Add extension bcmath,openssl,zlib 2026-02-06 16:33:50 +08:00
crazywhalecc
95f34fbbc3 Add extension amqp 2026-02-06 16:33:34 +08:00
crazywhalecc
d8d9f389ba Refactor patching logic for Alpine Linux and macOS in attr.php 2026-02-06 16:33:13 +08:00
crazywhalecc
c72a2b6228 Refactor nasm,php-sdk-binary-tools,strawberry-perl,vswhere 2026-02-06 14:46:57 +08:00
crazywhalecc
368461d1ad phpstan fix 2026-02-06 14:27:56 +08:00
crazywhalecc
ca9dc25f9a Add watcher 2026-02-06 14:26:24 +08:00
crazywhalecc
b6d8bf5639 Add unixodbc 2026-02-06 14:20:41 +08:00
crazywhalecc
a5f8402703 Add tidy 2026-02-06 14:16:20 +08:00
crazywhalecc
d163c3dff6 Add sqlite 2026-02-06 14:12:06 +08:00
crazywhalecc
fd40b92041 Add snappy 2026-02-06 14:07:04 +08:00
crazywhalecc
6be4da26aa Add readline 2026-02-06 14:03:42 +08:00
crazywhalecc
425010fbb0 Add re2c 2026-02-06 13:59:58 +08:00
crazywhalecc
67bea25214 Add qdbm 2026-02-06 13:55:03 +08:00
crazywhalecc
aad710ed3e Add postgresql 2026-02-06 13:40:18 +08:00
crazywhalecc
9912b213f0 Add net-snmp 2026-02-06 13:29:25 +08:00
crazywhalecc
2874336f0e Add mimalloc 2026-02-06 13:05:37 +08:00
crazywhalecc
b42601d288 Add libyaml 2026-02-06 13:02:24 +08:00
crazywhalecc
017fabd556 Add libxslt 2026-02-06 12:46:26 +08:00
crazywhalecc
0c386e967a Allow shell completion for build:libs command 2026-02-06 12:37:02 +08:00
crazywhalecc
d6af728e79 Add libuv 2026-02-06 12:32:04 +08:00
crazywhalecc
fa1b71bebf Add libuuid 2026-02-06 12:26:35 +08:00
crazywhalecc
127697b814 Add liburing 2026-02-06 11:54:15 +08:00
crazywhalecc
4cfd8f4ca3 Add librdkafka 2026-02-06 11:45:14 +08:00
crazywhalecc
f2d389d89a Add librabbitmq 2026-02-06 11:28:16 +08:00
crazywhalecc
bd11533865 Add libmemcached 2026-02-06 11:25:19 +08:00
crazywhalecc
e9a411cc66 Add libmaxminddb 2026-02-06 11:21:03 +08:00
crazywhalecc
272338775e Add liblz4 2026-02-06 11:17:37 +08:00
crazywhalecc
a832cc2114 Add libffi 2026-02-06 11:08:16 +08:00
crazywhalecc
880bb8799b Add libevent and postinstall action adder for library package 2026-02-06 10:55:59 +08:00
crazywhalecc
d999bfcd11 Add libavif 2026-02-06 10:25:43 +08:00
crazywhalecc
fba2676d80 Add lint-config command to check and sort configuration files 2026-02-06 10:17:58 +08:00
crazywhalecc
39a207076e Add libargon2 2026-02-06 10:11:24 +08:00
crazywhalecc
3cfab10f85 Add libacl 2026-02-06 10:05:35 +08:00
crazywhalecc
1eec88fd6c Add reset command 2026-02-06 09:59:29 +08:00
crazywhalecc
8f798c9006 Add imap and BuildRootTracker 2026-02-06 09:48:51 +08:00
crazywhalecc
7ae16e5be8 Add imagemagick,jbig,lerc,libaom,libde265,libheif,libjxl,libtiff,libwebp,libzip 2026-02-05 20:59:23 +08:00
crazywhalecc
807b90b182 Fix incorrect variable name for working directory in submodule update command 2026-02-05 20:56:50 +08:00
crazywhalecc
a07265787b Update license file path for bzip2 in configuration 2026-02-05 20:56:34 +08:00
crazywhalecc
a75060e5f6 Update exit code in ArtifactDownloader to reflect termination signal 2026-02-05 20:56:25 +08:00
crazywhalecc
97634b009f Forward-port #1006 changes 2026-02-05 19:21:13 +08:00
crazywhalecc
8fc2da9acf Use OS release definition for openssl 2026-02-05 19:19:26 +08:00
crazywhalecc
b3bbe0a751 Add libjpeg,libpng 2026-02-05 19:19:09 +08:00
crazywhalecc
0d32b7bfdb Refactor lib packing to v3 postinstall action 2026-02-05 16:42:49 +08:00
crazywhalecc
81ce777bf2 phpstan fix 2026-02-05 16:30:58 +08:00
crazywhalecc
9f2132c001 Add pack lib command 2026-02-05 16:11:28 +08:00
crazywhalecc
2a4959d973 Chore 2026-02-05 16:11:16 +08:00
crazywhalecc
4d4b1a334f Add ext-readline,freetype,gmssl,grpc,icu 2026-02-05 16:10:16 +08:00
crazywhalecc
6bd3646a02 Merge branch 'main' into v3-refactor/libs 2026-02-05 10:04:24 +08:00
crazywhalecc
b9af9ba056 Chore 2026-02-04 16:25:34 +08:00
crazywhalecc
16f94466fd Add artifact name suggestions for download and install commands 2026-02-04 16:25:23 +08:00
crazywhalecc
3fa2d69813 Add ext-mbstring,ext-mbregex,onig 2026-02-04 16:24:57 +08:00
crazywhalecc
0652d4aa03 Just in case source dir have not been created 2026-02-04 15:31:05 +08:00
crazywhalecc
8f44b07a12 Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refactor/libs 2026-02-04 15:28:36 +08:00
crazywhalecc
e9c27dee1f Add go-xcaddy,musl-toolchain,php,upx, and also glfw linux support 2026-02-04 15:28:10 +08:00
crazywhalecc
0afa1dd80c Use new brand name 2026-02-04 15:15:20 +08:00
crazywhalecc
e2011e1c18 Verbose message 2026-02-04 15:14:57 +08:00
crazywhalecc
08d20205a7 Allow all artifact configs 2026-02-04 15:14:44 +08:00
crazywhalecc
c40eaeef5d Fix custom artifact binary download is-installed check 2026-02-04 15:14:30 +08:00
crazywhalecc
b5c14d6f26 Fix golang download website hash match pattern 2026-02-04 15:12:19 +08:00
crazywhalecc
a02f287d97 Fix macOS wrong patch file directory 2026-02-03 20:23:59 +08:00
crazywhalecc
0d4cde79fa Add download options for build:libs command 2026-02-03 20:23:32 +08:00
crazywhalecc
274098b3a6 Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refactor/libs
# Conflicts:
#	config/artifact.yml
#	config/pkg.lib.yml
#	spc.registry.json
2026-02-03 19:14:53 +08:00
Jerry Ma
b89ff3c083 Add com_dotnet extension (#1023) 2026-02-03 19:08:19 +08:00
crazywhalecc
38f742156d Use zig toolchain by default, lint files 2026-02-03 14:01:41 +08:00
crazywhalecc
6fdbf629dc Fix selective artifact installation detect 2026-02-03 14:00:21 +08:00
crazywhalecc
7041e060f2 Add curl 2026-02-03 13:02:43 +08:00
crazywhalecc
103b5b3585 Upgrade phpstan to v2 2026-02-03 11:22:32 +08:00
crazywhalecc
c536fedff7 Add krb5 and lint configs 2026-02-03 10:59:56 +08:00
crazywhalecc
09ddd2fdd8 Add methods to retrieve package sub-dependencies and configuration 2026-02-03 10:59:37 +08:00
crazywhalecc
a2409d9c0f Add getSourceRoot for artifacts 2026-02-03 10:59:16 +08:00
crazywhalecc
6688819605 Add libedit 2026-02-03 10:17:13 +08:00
crazywhalecc
2e8f6bbb31 Add idn2 2026-02-03 10:10:10 +08:00
crazywhalecc
e4d6723b01 Add gettext 2026-02-03 10:05:39 +08:00
crazywhalecc
e732543bd7 Fix wrong debug message show 2026-02-03 10:05:28 +08:00
crazywhalecc
fddcdb8796 Add filelist downloader debug message 2026-02-03 10:05:11 +08:00
crazywhalecc
3492992b56 Add ncurses 2026-02-03 09:42:53 +08:00
crazywhalecc
a6c79e30a8 Add dump license files after installing 2026-02-02 16:53:28 +08:00
crazywhalecc
19e11caa83 Add ldap,libcares,libsodium,libunistring, lint all configs 2026-02-02 16:53:04 +08:00
crazywhalecc
6ee8dc7994 Add zstd,libcares 2026-02-02 16:15:36 +08:00
crazywhalecc
3d102363c4 Add PatchBeforeBuild attribute 2026-02-02 16:15:25 +08:00
crazywhalecc
82ab14165e Add nghttp2, nghttp3, ngtcp2 2026-02-02 15:56:12 +08:00
crazywhalecc
1586825b5b Add builder options for build:libs command 2026-02-02 15:55:41 +08:00
crazywhalecc
23db10d3cd Add libiconv,libssh2,libxml2,xz 2026-02-02 15:35:59 +08:00
crazywhalecc
5a8341203b Remove sort config command 2026-02-02 14:14:19 +08:00
crazywhalecc
f437efebb7 Add dev:lint-config to replace sort-config command 2026-02-02 14:14:01 +08:00
crazywhalecc
f4a29c4830 Add dev:lint-config to replace sort-config command 2026-02-02 14:13:05 +08:00
crazywhalecc
455d42d162 Separate package config 2026-02-02 13:32:35 +08:00
crazywhalecc
f232588dbe Merge remote-tracking branch 'origin/v3-refactor/libs' into v3-refactor/libs 2026-02-02 09:59:17 +08:00
crazywhalecc
a414c65f37 Forward-port #1022 spc target env var 2026-02-02 09:59:10 +08:00
crazywhalecc
7a262feb35 Merge branch 'refs/heads/main' into v3-refactor/libs 2026-02-02 09:35:26 +08:00
Marc
0cfa2036f0 fix spx shared libadd (#1022) 2026-01-30 20:23:18 +01:00
crazywhalecc
51415fb6bf Use shorter summary json file name 2026-01-26 00:50:53 +08:00
crazywhalecc
3a575f0bf7 Use yml instead of yaml (sync with craft) 2026-01-26 00:50:39 +08:00
crazywhalecc
ccd948e58a Add openssl lib support 2026-01-26 00:46:42 +08:00
crazywhalecc
a709221223 Add skip helper function for calling events 2026-01-26 00:43:57 +08:00
crazywhalecc
c27ed8b0b4 Implement fastlz, zlib (unix) 2026-01-22 16:50:31 +08:00
crazywhalecc
22fc7030f6 Implement attr, brotli, bzip2 build for unix 2026-01-22 16:05:21 +08:00
crazywhalecc
7b725bb4da Add LicenseDumper component 2026-01-22 16:04:48 +08:00
crazywhalecc
ae748757d1 Fix config yaml support 2026-01-22 16:03:06 +08:00
crazywhalecc
1865762f80 Fix config yaml support 2026-01-22 16:03:01 +08:00
Jerry Ma
75cfd7e4ed 3.0 Enhancement 2026-01-22 09:35:08 +08:00
crazywhalecc
a0cab24e56 Remove skeleton command 2026-01-22 09:32:22 +08:00
crazywhalecc
2c22bf25ea Refactor getOSRelease method for improved readability and efficiency 2026-01-20 16:56:46 +08:00
crazywhalecc
cfb8cc9fc5 Merge branch 'main' into v3-feat/skeleton
# Conflicts:
#	composer.lock
#	config/env.ini
#	src/SPC/ConsoleApplication.php
2026-01-20 15:25:43 +08:00
crazywhalecc
dd5762fbd3 Add lib skeleton command and sort config, spc_mode suuport, etc... 2025-12-18 15:43:58 +08:00
crazywhalecc
1707c679e8 Sort 2025-12-18 15:32:50 +08:00
crazywhalecc
acd0e2b23a Prepare for skeleton 2025-12-15 17:00:20 +08:00
Jerry Ma
c1c31a730b V3 feat/win (#999)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 16:09:50 +08:00
crazywhalecc
910f10a1dd Typo 2025-12-11 16:04:29 +08:00
crazywhalecc
fefcbf4029 Allow automatically get latest gRPC source (#909) 2025-12-11 15:51:32 +08:00
crazywhalecc
88d135a4e5 Allow interrupt on Windows 2025-12-11 15:50:39 +08:00
crazywhalecc
f8952da2a3 Update captainhook.json to cross-platform friendly 2025-12-11 14:54:30 +08:00
crazywhalecc
63c7aa8d38 Update captainhook.json to cross-platform friendly 2025-12-11 14:53:16 +08:00
crazywhalecc
355da340b4 Merge remote-tracking branch 'origin/v3-feat/win' into v3-feat/win 2025-12-11 14:53:03 +08:00
Jerry Ma
a4fd618a10 Update src/StaticPHP/Artifact/Artifact.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 14:49:16 +08:00
Jerry Ma
9a91aecb28 Update src/Package/Target/php/windows.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 14:47:44 +08:00
crazywhalecc
8bf2f42596 Merge remote-tracking branch 'origin/v3-feat/win' into v3-feat/win 2025-12-11 14:47:31 +08:00
Jerry Ma
4e841cfc67 Update src/Package/Target/php/windows.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 14:47:14 +08:00
crazywhalecc
da8b7c2bc4 Use the real build target to display 2025-12-11 14:45:56 +08:00
crazywhalecc
c4cec15c18 Use container instead of passing 2025-12-11 14:45:35 +08:00
crazywhalecc
e3f9894331 Apply copilot's suggestion 2025-12-11 14:43:42 +08:00
crazywhalecc
6d292b4c54 Add WindowsCMakeExecutor 2025-12-11 14:24:59 +08:00
crazywhalecc
f6b47ad810 Separate unix and windows build for php 2025-12-11 13:50:36 +08:00
crazywhalecc
7c8b40a49a Add windows php cli builds, support micro patches 2025-12-11 13:49:32 +08:00
crazywhalecc
48fbeab7e4 Add log for interactive term 2025-12-11 13:48:01 +08:00
crazywhalecc
eb0a36e379 Rename 2025-12-11 13:47:49 +08:00
crazywhalecc
4bbe56dd9f Fix windows extracting with curl typo, ignore traits in package 2025-12-11 13:47:32 +08:00
crazywhalecc
fe0b983f6c Fix debug mode and verbosity relation 2025-12-11 13:46:15 +08:00
crazywhalecc
2080407283 Enhance Windows support by updating artifact configuration and improving extraction logic 2025-12-11 11:35:12 +08:00
crazywhalecc
dc05ad23c9 Update captain hook for windows 2025-12-10 13:41:36 +08:00
crazywhalecc
458af6ac78 Add build function check for current OS and update validation logic 2025-12-10 13:38:25 +08:00
Jerry Ma
66d3af518b Add early validation for package build and installation requirements (#996) 2025-12-10 13:18:28 +08:00
crazywhalecc
2901d32ba7 Update ApplicationContext and InteractiveTerm to handle null outputs gracefully 2025-12-10 13:17:15 +08:00
crazywhalecc
794d92c9d8 Add early validation for package build and installation requirements 2025-12-10 12:54:04 +08:00
Jerry Ma
97e337cea2 Refactor test structure and update paths for improved organization (#995) 2025-12-10 11:28:08 +08:00
crazywhalecc
bde1440617 Refactor test structure and update paths for improved organization 2025-12-10 11:15:44 +08:00
Jerry Ma
78375632b4 V3 feat/re2c (#992)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 10:07:39 +08:00
Jerry Ma
f68adc3256 Update src/Package/Target/php.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 09:52:59 +08:00
Jerry Ma
4a968757ba Update src/Package/Library/ncurses.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-10 09:49:20 +08:00
crazywhalecc
bcaef59a15 Support full --no-ansi options 2025-12-09 16:54:29 +08:00
crazywhalecc
b0f630f95f Add package outputs, colorize motd 2025-12-09 16:34:43 +08:00
crazywhalecc
ac01867e9c Refactor stage execution to use method references for improved clarity 2025-12-09 15:01:41 +08:00
crazywhalecc
808aed2a66 Refactor package stage handling and update class structures for improved flexibility 2025-12-09 14:58:11 +08:00
crazywhalecc
e004d10861 Fix phpstan 2025-12-08 17:04:00 +08:00
crazywhalecc
0db26be826 Correct SAPI-packages to be installed 2025-12-08 17:02:12 +08:00
crazywhalecc
a4bd2a79a9 Add shared extension build support 2025-12-08 17:01:58 +08:00
crazywhalecc
7b16f683fc Allow package implementation using parent class functions 2025-12-08 17:01:29 +08:00
crazywhalecc
78234ef147 Add missing patchPkgconfPrefix function 2025-12-08 17:00:56 +08:00
crazywhalecc
80128edd39 Add patch description display 2025-12-08 17:00:34 +08:00
crazywhalecc
b384345723 Add php-micro patch for embed mode 2025-12-08 17:00:18 +08:00
crazywhalecc
f4bb0263f6 Fix ncurses static-libs 2025-12-08 17:00:03 +08:00
crazywhalecc
321f2e13e8 Allow all types of package can be built 2025-12-08 16:59:38 +08:00
crazywhalecc
11e7a590c8 Add ncurses package build 2025-12-08 16:58:47 +08:00
crazywhalecc
20e0711747 Add libedit package build 2025-12-08 16:58:42 +08:00
crazywhalecc
80d922ab3b Use patch for current package exclusively 2025-12-08 16:58:04 +08:00
crazywhalecc
a1cadecc54 Refactor re2c fix-item 2025-12-08 12:45:12 +08:00
Jerry Ma
127c935106 Refactor BUILDROOT_ABS initialization to provide a default path (#991) 2025-12-08 12:33:37 +08:00
crazywhalecc
eab105965d Remove redundant path 2025-12-08 11:06:50 +08:00
crazywhalecc
abd6c2fa3a Add PackageInstaller::isPackageInstalled() API 2025-12-08 11:06:50 +08:00
crazywhalecc
df6c27c98d Allow absolute paths for configs 2025-12-08 11:06:50 +08:00
crazywhalecc
3ff762c4c8 Fix wrong namespace in go-xcaddy package 2025-12-08 11:06:50 +08:00
crazywhalecc
6775cb4674 Fix pkg-config doctor fix using source bug 2025-12-08 11:06:50 +08:00
crazywhalecc
88b86d3eaf Fix artifact downloade does not accept boolean options bug 2025-12-08 11:06:50 +08:00
crazywhalecc
dbc6dbee53 Add Zig package support with downloader and installation checks 2025-12-08 11:06:50 +08:00
crazywhalecc
baddd60113 Add dev commands: is-installed, shell (for debugging package status) 2025-12-08 11:06:50 +08:00
crazywhalecc
2f09ace82f Add LinuxToolCheck 2025-12-08 11:06:50 +08:00
Jerry Ma
d3b0f5de79 Fix argument naming in InstallPackageCommand for clarity (#989) 2025-12-06 16:57:16 +08:00
Jerry Ma
9ad7147155 Enhance musl-wrapper and musl-toolchain installation process (#988) 2025-12-06 16:50:36 +08:00
Jerry Ma
106b55d4e7 [v3] Add musl-wrapper and musl-toolchain installation support (#984) 2025-12-05 15:32:32 +08:00
crazywhalecc
93a697ebbf Fix artifact downloader constants and improve error message for hosted package-bin 2025-12-05 15:31:56 +08:00
crazywhalecc
7fa6fd08d4 Add HostedPackageBin downloader and enhance artifact handling 2025-12-05 15:31:56 +08:00
crazywhalecc
52553fb5ed Fix PHPStan errors 2025-12-05 15:31:56 +08:00
crazywhalecc
c925914925 Add version getter and checksum for go-xcaddy artifact 2025-12-05 15:31:56 +08:00
crazywhalecc
d16f5a972c Add --with-packages option for spc-config command 2025-12-04 21:21:48 +08:00
crazywhalecc
ee46c1c387 Fix switch-php-version command not working bug 2025-12-04 21:21:27 +08:00
crazywhalecc
64fde5fd8c Allow loading config dir from registry 2025-12-04 21:20:44 +08:00
crazywhalecc
dc5bf6dc98 Correct install-pkg argument name, add alias 2025-12-04 21:20:22 +08:00
crazywhalecc
20892ab194 Auto-append prefix for php-extension packages 2025-12-04 21:19:55 +08:00
crazywhalecc
e9d3f7e7eb Change wrong option name 2025-12-04 21:19:34 +08:00
crazywhalecc
2f8570b59e Implement missing legacy options 2025-12-04 21:19:11 +08:00
crazywhalecc
71d803d36f cs fix 2025-12-04 10:54:05 +08:00
crazywhalecc
daa87e1350 Add DirDiff utility and enhance package build process
- Introduced DirDiff class for tracking directory file changes.
- Updated ConsoleApplication to use addCommand for build targets.
- Enhanced PackageBuilder with methods for deploying binaries and extracting debug info.
- Improved package installation logic to support shared extensions.
- Added readline extension with patching for static builds.
2025-12-04 10:53:49 +08:00
crazywhalecc
c38f174a6b Forward-port #978 2025-12-02 13:42:46 +08:00
crazywhalecc
9903c2294c Merge branch 'main' into v3-dev 2025-12-02 13:39:19 +08:00
crazywhalecc
14bfb4198a v3 base 2025-11-30 15:35:04 +08:00
crazywhalecc
f6c818d3c0 v3 base 2025-11-29 18:58:16 +08:00
1066 changed files with 49175 additions and 34232 deletions

View File

@@ -1,17 +1,12 @@
## What does this PR do?
<!-- Please describe the changes made in this PR here. -->
## Checklist before merging
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
> If a modification is not involved, please skip it directly.
- If you modified `*.php` or `*.json`, run them locally to ensure your changes are valid:
- If you modified `*.php` or `*.yml`, run them locally to ensure your changes are valid:
- [ ] `composer cs-fix`
- [ ] `composer analyse`
- [ ] `composer test`
- [ ] `bin/spc dev:sort-config`
- If it's an extension or dependency update, please ensure the following:
- [ ] Add your test combination to `src/globals/test-extensions.php`.
- [ ] If adding new or fixing bugs, add commit message containing `extension test` or `test extensions` to trigger full test suite.
- [ ] `bin/spc dev:lint-config`

View File

@@ -29,6 +29,9 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
@@ -42,10 +45,22 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: Show full build logs
type: boolean
@@ -69,6 +84,9 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
@@ -82,10 +100,22 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Include suggested libs
type: boolean
default: false
debug:
description: Show full build logs
type: boolean
@@ -144,8 +174,19 @@ jobs:
RUNS_ON="macos-15"
;;
esac
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD ${{ inputs.extensions }}"
STATIC_EXTS="${{ inputs.extensions }}"
SHARED_EXTS="${{ inputs['shared-extensions'] }}"
BUILD_FRANKENPHP="${{ inputs['build-frankenphp'] }}"
ENABLE_ZTS="${{ inputs['enable-zts'] }}"
ALL_EXTS="$STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
ALL_EXTS="$ALL_EXTS,$SHARED_EXTS"
fi
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=$ALL_EXTS --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD $STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
BUILD_CMD="$BUILD_CMD --build-shared=$SHARED_EXTS"
fi
if [ -n "${{ inputs.extra-libs }}" ]; then
DOWN_CMD="$DOWN_CMD --for-libs=${{ inputs.extra-libs }}"
BUILD_CMD="$BUILD_CMD --with-libs=${{ inputs.extra-libs }}"
@@ -157,6 +198,9 @@ jobs:
if [ ${{ inputs.prefer-pre-built }} == true ]; then
DOWN_CMD="$DOWN_CMD --prefer-pre-built"
fi
if [ ${{ inputs.with-suggested-libs }} == true ]; then
BUILD_CMD="$BUILD_CMD --with-suggested-libs"
fi
if [ ${{ inputs.build-cli }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-cli"
fi
@@ -166,6 +210,12 @@ jobs:
if [ ${{ inputs.build-fpm }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-fpm"
fi
if [ "$BUILD_FRANKENPHP" = "true" ]; then
BUILD_CMD="$BUILD_CMD --build-frankenphp"
fi
if [ "$ENABLE_ZTS" = "true" ]; then
BUILD_CMD="$BUILD_CMD --enable-zts"
fi
echo 'download='"$DOWN_CMD" >> "$GITHUB_OUTPUT"
echo 'build='"$BUILD_CMD" >> "$GITHUB_OUTPUT"
echo 'run='"$RUNS_ON" >> "$GITHUB_OUTPUT"
@@ -188,6 +238,27 @@ jobs:
env:
phpts: nts
- if: ${{ inputs['build-frankenphp'] == true }}
name: "Install go-xcaddy for FrankenPHP"
run: |
case "${{ inputs.os }}" in
linux-x86_64|linux-aarch64)
./bin/spc-alpine-docker install-pkg go-xcaddy
;;
linux-x86_64-glibc|linux-aarch64-glibc)
./bin/spc-gnu-docker install-pkg go-xcaddy
;;
macos-x86_64|macos-aarch64)
composer update --no-dev --classmap-authoritative
./bin/spc doctor --auto-fix
./bin/spc install-pkg go-xcaddy
;;
*)
echo "Unsupported OS for go-xcaddy install: ${{ inputs.os }}"
exit 1
;;
esac
# Cache downloaded source
- id: cache-download
uses: actions/cache@v4
@@ -202,10 +273,18 @@ jobs:
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# Upload debug logs
- if: ${{ inputs.debug && failure() }}
name: "Upload build logs on failure"
uses: actions/upload-artifact@v7
with:
name: spc-logs-${{ inputs.php-version }}-${{ inputs.os }}
path: log/*.log
# Upload cli executable
- if: ${{ inputs.build-cli == true }}
name: "Upload PHP cli SAPI"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: php-cli-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/php
@@ -213,7 +292,7 @@ jobs:
# Upload micro self-extracted executable
- if: ${{ inputs.build-micro == true }}
name: "Upload PHP micro SAPI"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: php-micro-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/micro.sfx
@@ -221,18 +300,33 @@ jobs:
# Upload fpm executable
- if: ${{ inputs.build-fpm == true }}
name: "Upload PHP fpm SAPI"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: php-fpm-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/php-fpm
# Upload frankenphp executable
- if: ${{ inputs['build-frankenphp'] == true }}
name: "Upload FrankenPHP SAPI"
uses: actions/upload-artifact@v7
with:
name: php-frankenphp-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/frankenphp
# Upload extensions metadata
- uses: actions/upload-artifact@v4
- if: ${{ inputs['shared-extensions'] != '' }}
name: "Upload shared extensions"
uses: actions/upload-artifact@v7
with:
name: php-shared-ext-${{ inputs.php-version }}-${{ inputs.os }}
path: |
buildroot/modules/*.so
- uses: actions/upload-artifact@v7
name: "Upload License Files"
with:
name: license-files-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/license/
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
name: "Upload Build Metadata"
with:
name: build-meta-${{ inputs.php-version }}-${{ inputs.os }}

View File

@@ -29,6 +29,10 @@ on:
description: prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: enable debug logs
type: boolean
@@ -90,24 +94,24 @@ jobs:
# Upload cli executable
- if: ${{ inputs.build-cli == true }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: php-${{ inputs.version }}
path: buildroot/bin/php.exe
# Upload micro self-extracted executable
- if: ${{ inputs.build-micro == true }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: micro-${{ inputs.version }}
path: buildroot/bin/micro.sfx
# Upload extensions metadata
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: license-files
path: buildroot/license/
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: build-meta
path: |

View File

@@ -2,9 +2,9 @@ name: Build SPC Binary
on:
push:
branches: [ "main" ]
branches: [ "main", "v3" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "v3" ]
paths:
- '.github/workflows/release-build.yml'
release:
@@ -40,7 +40,7 @@ jobs:
filename: "spc-windows-x64.exe"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
uses: "actions/checkout@v5"
- if: inputs.debug == true
run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV
@@ -60,7 +60,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v4"
uses: "actions/cache@v5"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-${{ env.PHP_VERSION }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
@@ -101,7 +101,7 @@ jobs:
tar -czf ${{ matrix.operating-system.filename }} spc
# validate spc binary
if [ "${{ matrix.operating-system.name }}" == "linux-x86_64" ]; then
./spc dev:extensions
./spc dev:info php
fi
fi
@@ -120,20 +120,44 @@ jobs:
with:
files: dist/${{ matrix.operating-system.filename }}
- name: "Deploy to self-hosted OSS"
# only run this step if the repository is static-php-cli and the branch is main
if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
- name: "Deploy to self-hosted OSS (nightly)"
# only run this step if the repository is static-php-cli and is push to v3 branch
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/v3' }}
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: static-php-cli/spc-bin/nightly/
destination_dir: v3/spc-bin/nightly/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Deploy to self-hosted OSS (latest)"
# only run this step if the repository is static-php-cli and is release tag
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: v3/spc-bin/latest/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Deploy to self-hosted OSS (versioned)"
# only run this step if the repository is static-php-cli and is release tag
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: v3/spc-bin/${{ github.ref_name }}/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
path: spc${{ env.SUFFIX }}
name: spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
@@ -156,10 +180,10 @@ jobs:
os: "windows-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: "Download Artifact"
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
env:
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
with:
@@ -172,4 +196,4 @@ jobs:
- name: "Run SPC Tests"
env:
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
run: ./spc${{ env.SUFFIX }} dev:extensions
run: ./spc${{ env.SUFFIX }} dev:info php

View File

@@ -1,9 +1,9 @@
name: Tests
name: v3 Tests
on:
pull_request:
branches: [ "main" ]
types: [ opened, synchronize, reopened ]
branches: [ "v3" ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
paths:
- 'src/**'
- 'config/**'
@@ -15,6 +15,10 @@ on:
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -103,112 +107,171 @@ jobs:
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: "Run PHPUnit Tests"
run: SPC_LIBC=glibc vendor/bin/phpunit tests/ --no-coverage
run: vendor/bin/phpunit tests/ --no-coverage
define-matrix:
name: "Define Matrix"
check-gate:
name: "Check: need-test label"
runs-on: ubuntu-latest
outputs:
php: ${{ steps.gendef.outputs.php }}
os: ${{ steps.gendef.outputs.os }}
enabled: ${{ steps.gate.outputs.enabled }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: curl, openssl, mbstring
- name: Define
id: gendef
- name: Check label
id: gate
run: |
PHP_VERSIONS=$(php src/globals/test-extensions.php php)
OS_VERSIONS=$(php src/globals/test-extensions.php os)
echo 'php='"$PHP_VERSIONS" >> "$GITHUB_OUTPUT"
echo 'os='"$OS_VERSIONS" >> "$GITHUB_OUTPUT"
LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}'
if echo "$LABELS" | grep -q '"need-test"'; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
fi
build:
name: "Build PHP Test (PHP ${{ matrix.php }} ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
needs: [define-matrix, php-cs-fixer, phpstan, phpunit]
timeout-minutes: 120
strategy:
matrix:
php: ${{ fromJSON(needs.define-matrix.outputs.php) }}
os: ${{ fromJSON(needs.define-matrix.outputs.os) }}
fail-fast: false
test-bot:
name: "Test Bot: analyze PR"
needs: check-gate
if: needs.check-gate.outputs.enabled == 'true'
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
outputs:
need_test: ${{ steps.bot.outputs.need_test }}
gen_matrix_args: ${{ steps.bot.outputs.gen_matrix_args }}
gen_matrix_args_tier2: ${{ steps.bot.outputs.gen_matrix_args_tier2 }}
php_versions: ${{ steps.bot.outputs.php_versions }}
tier2: ${{ steps.bot.outputs.tier2 }}
steps:
- name: "Update runner packages"
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: sudo apt-get update && sudo apt-get install -y ca-certificates
- uses: actions/checkout@v4
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup PHP"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: pecl, composer
php-version: '8.4'
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
- name: Run dev:test-bot
id: bot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BOT_JSON=$(php -d opcache.enable_cli=0 bin/spc dev:test-bot \
--pr=${{ github.event.pull_request.number }} \
--repo=${{ github.repository }} 2>/dev/null)
echo "need_test=$(echo "$BOT_JSON" | jq -r '.need_test')" >> "$GITHUB_OUTPUT"
echo "gen_matrix_args=$(echo "$BOT_JSON" | jq -r '.gen_matrix_args')" >> "$GITHUB_OUTPUT"
echo "gen_matrix_args_tier2=$(echo "$BOT_JSON" | jq -r '.gen_matrix_args_tier2')" >> "$GITHUB_OUTPUT"
echo "php_versions=$(echo "$BOT_JSON" | jq -c '.php_versions')" >> "$GITHUB_OUTPUT"
echo "tier2=$(echo "$BOT_JSON" | jq -r '.tier2')" >> "$GITHUB_OUTPUT"
COMMENT_BODY=$(echo "$BOT_JSON" | jq -r '.comment_body')
MARKER="<!-- spc-test-bot -->"
# Find existing bot comment id
EXISTING_ID=$(gh api \
repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq "[.[] | select(.body | startswith(\"$MARKER\")) | .id] | first // empty")
if [ -n "$EXISTING_ID" ]; then
gh api --method PATCH \
repos/${{ github.repository }}/issues/comments/"$EXISTING_ID" \
-f body="$COMMENT_BODY"
else
gh pr comment ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--body "$COMMENT_BODY"
fi
gen-matrix:
name: "Generate test matrix"
needs: test-bot
if: needs.test-bot.outputs.need_test == 'true'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
- name: Build matrix
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEN_MATRIX_ARGS: ${{ needs.test-bot.outputs.gen_matrix_args }}
GEN_MATRIX_ARGS_TIER2: ${{ needs.test-bot.outputs.gen_matrix_args_tier2 }}
PHP_VERSIONS: ${{ needs.test-bot.outputs.php_versions }}
TIER2: ${{ needs.test-bot.outputs.tier2 }}
run: |
# Tier1 matrix
MATRIX1=$(bin/spc dev:gen-ext-test-matrix $GEN_MATRIX_ARGS 2>/dev/null)
# Merge Tier2 if requested
if [ "$TIER2" = "true" ] && [ -n "$GEN_MATRIX_ARGS_TIER2" ]; then
MATRIX2=$(bin/spc dev:gen-ext-test-matrix $GEN_MATRIX_ARGS_TIER2 2>/dev/null)
COMBINED=$(jq -n --argjson m1 "$MATRIX1" --argjson m2 "$MATRIX2" '$m1 + $m2')
else
COMBINED=$MATRIX1
fi
# Expand PHP versions: cartesian product of entries × php_versions
FINAL=$(echo "$COMBINED" | jq --argjson versions "$PHP_VERSIONS" \
'[.[] | . as $entry | $versions[] | $entry + {"php-version": .}]')
echo "matrix=$(echo "$FINAL" | jq -c '{"combo": .}')" >> "$GITHUB_OUTPUT"
ext-test:
name: "Ext test: ${{ matrix.combo.extension }} (PHP ${{ matrix.combo.php-version }} · ${{ matrix.combo.os }}-${{ matrix.combo.arch }})"
needs: gen-matrix
runs-on: ${{ matrix.combo.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
env:
phpts: nts
- name: "Cache composer packages"
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
# Cache downloaded source
- id: cache-download
uses: actions/cache@v4
with:
path: downloads
key: php-dependencies-${{ matrix.os }}
- name: "Install Dependencies"
run: composer update -vvv --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-plugins
- name: "Run Build Tests (doctor)"
run: php src/globals/test-extensions.php doctor_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Prepare UPX for Windows"
if: ${{ startsWith(matrix.os, 'windows-') }}
- name: Build
env:
SPC_USE_SUDO: "yes"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $env:GITHUB_ENV
./bin/spc doctor --auto-fix
${{ matrix.combo.build-args }} --dl-with-php=${{ matrix.combo.php-version }}
- name: "Prepare UPX for Linux"
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
# - name: Setup upterm session
# if: ${{ failure() }}
# uses: owenthereal/action-upterm@v1
- name: "Run Build Tests (download)"
run: php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Run Build Tests (build)"
run: php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Run Build Tests (build - embed for non-windows)"
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: php src/globals/test-extensions.php build_embed_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Upload logs"
if: ${{ always() && hashFiles('log/**') != '' }}
- name: Upload logs
if: always() && hashFiles('log/**') != ''
uses: actions/upload-artifact@v4
with:
name: build-logs-${{ matrix.os }}-${{ matrix.php }}
name: logs-${{ matrix.combo.os }}-${{ matrix.combo.arch }}-${{ matrix.combo.extension }}-php${{ matrix.combo.php-version }}
path: log
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

View File

@@ -1,71 +1,68 @@
name: Docs Auto Deploy
on:
push:
branches:
- main
paths:
- 'config/**.json'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.repository == 'crazywhalecc/static-php-cli'
steps:
- name: Checkout master
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install --frozen-lockfile
- name: "Copy Config Files"
run: |
mkdir -p docs/.vitepress/config
cp -r config/* docs/.vitepress/config/
- name: "Install PHP for official runners"
uses: shivammathur/setup-php@v2
with:
coverage: none
tools: composer:v2
php-version: 8.4
ini-values: memory_limit=-1
extensions: curl, openssl, mbstring
- name: "Get Composer Cache Directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-8.2-locked-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
php-8.2-locked-composer
- name: "Install Locked Dependencies"
run: "composer install --no-interaction --no-progress"
- name: "Generate Extension Support List"
run: |
bin/spc dev:gen-ext-docs > docs/extensions.md
bin/spc dev:gen-ext-dep-docs > docs/deps-map-ext.md
bin/spc dev:gen-lib-dep-docs > docs/deps-map-lib.md
- name: Build
run: yarn docs:build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
name: Docs build test and auto deploy
on:
pull_request:
branches: [ "v3" ]
types: [ opened, synchronize, reopened ]
paths:
- 'config/**.yml'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
push:
branches: [ "v3" ]
paths:
- 'config/**.yml'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.repository == 'crazywhalecc/static-php-cli'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: npm install
- name: "Install PHP for official runners"
uses: shivammathur/setup-php@v2
with:
coverage: none
tools: composer:v2
php-version: 8.4
ini-values: memory_limit=-1
extensions: curl, openssl, mbstring
- name: "Get Composer Cache Directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-8.2-locked-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
php-8.2-locked-composer
- name: "Install Locked Dependencies"
run: "composer install --no-interaction --no-progress"
- name: Build
run: npm run docs:build
# Deploy to GitHub Pages only when the workflow is triggered by a push to the v3 branch
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/v3'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist

19
.gitignore vendored
View File

@@ -1,8 +1,8 @@
.idea
runtime/
docker/libraries/
docker/extensions/
docker/source/
/runtime/
/docker/libraries/
/docker/extensions/
/docker/source/
# Vendor files
/vendor/**
@@ -33,6 +33,9 @@ packlib_files.txt
.php-cs-fixer.cache
.phpunit.result.cache
# doctor cache fallback (when ~/.cache/spc/ is not writable)
.spc-doctor.lock
# exclude self-runtime
/bin/*
!/bin/spc*
@@ -49,6 +52,8 @@ packlib_files.txt
/node_modules/
/docs/.vitepress/dist/
/docs/.vitepress/cache/
/docs/.vitepress/ext-data.json
/docs/.vitepress/deps-data.json
package-lock.json
pnpm-lock.yaml
@@ -61,3 +66,9 @@ log/
# spc.phar
spc.phar
spc.exe
# dumped files from StaticPHP v3
/dump-*.json
# config parse cache
/.spc.cache.php

View File

@@ -69,6 +69,6 @@ return (new PhpCsFixer\Config())
'php_unit_data_provider_method_order' => false,
])
->setFinder(
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/SPC'])
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/StaticPHP'])
)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());

View File

@@ -1,3 +0,0 @@
# static-php-cli
English README has been moved to [README.md](README.md).

View File

@@ -1,172 +1,156 @@
# static-php-cli
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
**static-php-cli** 是一个用于构建静态、独立 PHP 运行时的强大工具,支持众多流行扩展。
## 特性
- :elephant: **支持多 PHP 版本** - 支持 PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: **单文件 PHP 可执行文件** - 构建零依赖的独立 PHP
- :hamburger: **phpmicro 集成** - 构建 **[phpmicro](https://github.com/dixyes/phpmicro)** 自解压可执行文件(将 PHP 二进制文件和源代码合并为一个文件)
- :pill: **智能环境检查器** - 自动构建环境检查器,具备自动修复功能
- :zap: **跨平台支持** - 支持 Linux、macOS、FreeBSD 和 Windows
- :wrench: **可配置补丁** - 可自定义的源代码补丁系统
- :books: **智能依赖管理** - 自动处理构建依赖
- 📦 **自包含工具** - 提供使用 [box](https://github.com/box-project/box) 构建的 `spc` 可执行文件
- :fire: **广泛的扩展支持** - 支持 75+ 流行 [扩展](https://static-php.dev/zh/guide/extensions.html)
- :floppy_disk: **UPX 压缩** - 减小二进制文件大小 30-50%(仅 Linux/Windows
**单文件独立 php-cli**
<img width="700" alt="out1" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/01a2e60f-13b0-4242-a645-f7afa4936396">
**使用 phpmicro 将 PHP 代码与 PHP 解释器结合:**
<img width="700" alt="out2" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/46b7128d-fb72-4169-957e-48564c3ff3e2">
## 快速开始
### 1. 下载 spc 二进制文件
```bash
# Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 或更高版本,请先安装 VS2022)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
```
对于 macOS 和 Linux请先添加执行权限
```bash
chmod +x ./spc
```
### 2. 构建静态 PHP
首先,创建一个 `craft.yml` 文件,并从 [扩展列表](https://static-php.dev/zh/guide/extensions.html) 或 [命令生成器](https://static-php.dev/zh/guide/cli-generator.html) 中指定要包含的扩展:
```yml
# PHP 版本支持8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.4
# 在此处放置您的扩展列表
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
- fpm
download-options:
prefer-pre-built: true
```
运行命令:
```bash
./spc craft
# 输出完整控制台日志
./spc craft --debug
```
### 3. 静态 PHP 使用
现在您可以将 static-php-cli 构建的二进制文件复制到另一台机器上,无需依赖即可运行:
```
# php-cli
buildroot/bin/php -v
# phpmicro
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
# php-fpm
buildroot/bin/php-fpm -v
```
## 文档
当前 README 包含基本用法。有关 static-php-cli 的所有功能,
请访问 <https://static-php.dev>。
## 直接下载
如果您不想构建或想先测试,可以从 [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) 下载示例预编译工件,或从自托管服务器下载。
以下是几个具有不同扩展组合的预编译静态 PHP 二进制文件,
您可以根据需要直接下载。
| 组合名称 | 扩展数量 | 系统 | 备注 |
|----------------------------------------------------------------------|----------------------------------------------------------------------------|--------------|--------------------|
| [common](https://dl.static-php.dev/static-php-cli/common/) | [30+](https://dl.static-php.dev/static-php-cli/common/README.txt) | Linux, macOS | 二进制文件大小约为 7.5MB |
| [bulk](https://dl.static-php.dev/static-php-cli/bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | 二进制文件大小约为 25MB |
| [gnu-bulk](https://dl.static-php.dev/static-php-cli/gnu-bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | 使用 glibc 的 bulk 组合 |
| [minimal](https://dl.static-php.dev/static-php-cli/minimal/) | [5](https://dl.static-php.dev/static-php-cli/minimal/README.txt) | Linux, macOS | 二进制文件大小约为 3MB |
| [spc-min](https://dl.static-php.dev/static-php-cli/windows/spc-min/) | [5](https://dl.static-php.dev/static-php-cli/windows/spc-min/README.txt) | Windows | 二进制文件大小约为 3MB |
| [spc-max](https://dl.static-php.dev/static-php-cli/windows/spc-max/) | [40+](https://dl.static-php.dev/static-php-cli/windows/spc-max/README.txt) | Windows | 二进制文件大小约为 8.5MB |
> Linux 和 Windows 支持对二进制文件进行 UPX 压缩,可以将二进制文件大小减少 30% 到 50%。
> macOS 不支持 UPX 压缩,因此 mac 的预构建二进制文件大小较大
### 在线构建(使用 GitHub Actions
上方直接下载的二进制不能满足需求时,可使用 GitHub Action 可以轻松构建静态编译的 PHP
同时自行定义要编译的扩展
1. Fork 本项目
2. 进入项目的 Actions 并选择 `CI`
3. 选择 `Run workflow`,填入您要编译的 PHP 版本、目标类型和扩展列表。(扩展用逗号分隔,例如 `bcmath,curl,mbstring`
4. 等待一段时间后,进入相应的任务并获取 `Artifacts`
如果您启用 `debug`,构建时将输出所有日志,包括编译日志,以便故障排除。
## 贡献
如果您需要的扩展缺失,可以创建 issue。
如果您熟悉本项目,也欢迎发起 pull request
如果您想贡献文档,请直接编辑 `docs/` 目录。
现在有一个 [static-php](https://github.com/static-php) 组织,用于存储与项目相关的仓库
## 赞助本项目
您可以从 [GitHub Sponsor](https://github.com/crazywhalecc) 赞助我或我的项目。您捐赠的一部分将用于维护 **static-php.dev** 服务器。
**特别感谢以下赞助商**
<a href="https://beyondco.de/"><img src="/docs/public/images/beyondcode-seeklogo.png" width="300" alt="Beyond Code Logo" /></a>
<a href="https://nativephp.com/"><img src="/docs/public/images/nativephp-logo.svg" width="300" alt="NativePHP Logo" /></a>
## 开源许可证
本项目本身基于 MIT 许可证,
一些新添加的扩展和依赖可能来自其他项目,
这些代码文件的头部也会给出额外的许可证和作者说明。
这些是类似的项目:
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs)
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli)
本项目使用了 [dixyes/lwmbs](https://github.com/dixyes/lwmbs) 的一些代码,例如 Windows 静态构建目标和 libiconv 支持。
lwmbs 基于 [Mulan PSL 2](http://license.coscl.org.cn/MulanPSL2) 许可证。
由于本项目的特殊性,
项目编译过程中会使用许多其他开源项目,如 curl 和 protobuf
它们都有自己的开源许可证。
请在编译后使用 `bin/spc dump-license` 命令导出项目中使用的开源许可证,
并遵守相应项目的 LICENSE。
# StaticPHP
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/nrSRbpMJ?label=Discord&logo=discord&style=flat-square)](https://discord.gg/xf6Rd4pEAk)
**StaticPHP** 是一个强大的工具,用于构建可移植的可执行文件,包括 PHP、扩展等。
> [!IMPORTANT]
> 我们正准备发布 **v3** 版本,届时项目名称将从 **static-php-cli** 更改为 **StaticPHP**。
> 此分支对应 v3 版本。v2 版本请查看 [v2 分支](https://github.com/crazywhalecc/static-php-cli/tree/main)。
> 请更新您的参考资料,并关注正式版发布。
## 特性
- :elephant: 支持多个 PHP 版本 - PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: 构建零依赖的单文件 PHP 可执行程序
- :hamburger: 构建 **[phpmicro](https://github.com/static-php/phpmicro)** 自解压可执行文件(将 PHP 二进制和源码合并为单个文件)
- :pill: 自动构建环境检查器,支持自动修复
- :zap: 支持 `Linux``macOS``Windows`
- :wrench: 通过 vendor 模式和自定义注册表实现便捷扩展
- :books: 智能依赖管理
- 📦 自包含 `spc` 可执行文件,便于自安装
- :fire: 支持 100+ 热门 [PHP 扩展](https://static-php.dev/en/guide/extensions.html)
- :floppy_disk: 支持 UPX 压缩(二进制体积可缩小 30-50%
**单文件独立 php-cli**
<img width="700" alt="out1" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/01a2e60f-13b0-4242-a645-f7afa4936396">
**使用 phpmicro 将 PHP 代码与 PHP 解释器结合:**
<img width="700" alt="out2" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/46b7128d-fb72-4169-957e-48564c3ff3e2">
## 快速开始
### 1. 下载 spc 二进制
```bash
# For Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/nightly/spc-windows-x64.exe
```
对于 macOS 和 Linux请先添加可执行权限
```bash
chmod +x ./spc
```
### 2. 构建静态 PHP
首先,创建 `craft.yml` 文件,并从 [扩展列表](https://static-php.dev/en/guide/extensions.html) 或 [命令生成器](https://static-php.dev/en/guide/cli-generator.html) 指定要包含的扩展:
```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.5
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
download-options:
parallel: 10
```
运行命令:
```bash
./spc craft
# 输出完整控制台日志
./spc craft -vvv
```
### 3. 静态 PHP 使用
现在你可以将 StaticPHP 构建的二进制复制到另一台机器并在无依赖环境下运行:
```
# php-cli
buildroot/bin/php -v
# phpmicro
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
```
## 文档
当前 README 包含基础用法。有关 StaticPHP 的完整功能集,
请访问 <https://static-php.dev>。
## 直接下载
如果你暂时不想构建,或只想先测试,可以从 [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) 下载示例预编译产物,或从自托管服务器下载。
我们为每个 PHP 版本提供 2 种扩展集合:
- **gigantic**:尽可能包含更多扩展,二进制大小约 100-150MB。
- **base**:仅包含 StaticPHP 自身使用的少量扩展,二进制大小约 10MB。
> WIP
### 在线构建(使用 GitHub Actions
当上方直接下载的二进制无法满足你的需求时,
你可以使用 GitHub Actions 轻松构建静态编译的 PHP
并同时自定义要编译的扩展列表
1. Fork 此仓库。
2. 进入项目的 Actions 并选择 `CI`
3. 选择 `Run workflow`,填写你要编译的 PHP 版本、目标类型和扩展列表。(扩展用逗号分隔,例如 `bcmath,curl,mbstring`
4. 等待工作流执行完成后,进入对应运行记录并下载 `Artifacts`
如果你启用 `debug`,构建时将输出所有日志,包括编译日志,便于排查问题
> 我们也计划在未来提供可复用的 GitHub Actions 工作流,
> 这样你无需 fork 本项目,也能在自己的仓库中轻松构建 static PHP
## 贡献
如果你需要的扩展缺失,可以创建 issue。
如果你熟悉本项目,也欢迎发起 pull request。
如果你想贡献文档,请直接编辑 `docs/`
## 赞助本项目
你可以通过 [GitHub Sponsor](https://github.com/crazywhalecc) 赞助我或我的项目。你捐赠的一部分将用于维护 **static-php.dev** 服务器
**特别感谢以下赞助商:**
<a href="https://beyondco.de/"><img src="/docs/public/images/beyondcode-seeklogo.png" width="300" alt="Beyond Code Logo" /></a>
<a href="https://nativephp.com/"><img src="/docs/public/images/nativephp-logo.svg" width="300" alt="NativePHP Logo" /></a>
## 开源许可证
本项目本身采用 MIT 许可证。
一些新添加的扩展和依赖可能来自其他项目。
这些源码文件头部也可能包含额外的 LICENSE 和 AUTHOR 信息。
请在编译后使用 `bin/spc dump-license` 命令导出项目中使用的开源许可证,
并遵守对应项目的 LICENSE。

View File

@@ -1,25 +1,30 @@
# static-php-cli
# StaticPHP
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/nrSRbpMJ?label=Discord&logo=discord&style=flat-square)](https://discord.gg/xf6Rd4pEAk)
**static-php-cli** is a powerful tool designed for building static, standalone PHP runtime
with popular extensions.
**StaticPHP** is a powerful tool designed for building portable executables including PHP, extensions, and more.
> [!IMPORTANT]
> We are preparing to release **v3**, which will include a project rename from **static-php-cli** to **StaticPHP**.
> And this branch is for v3. For v2, please check the [v2 branch](https://github.com/crazywhalecc/static-php-cli/tree/main).
> Please update your references and stay tuned for the official release.
## Features
- :elephant: Support multiple PHP versions - PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: Build single-file PHP executable with zero dependencies
- :hamburger:Build **[phpmicro](https://github.com/dixyes/phpmicro)** self-extracting executables (combines PHP binary and source code into one file)
- :hamburger: Build **[phpmicro](https://github.com/static-php/phpmicro)** self-extracting executables (combines PHP binary and source code into one file)
- :pill: Automatic build environment checker with auto-fix capabilities
- :zap: `Linux`, `macOS`, `FreeBSD`, `Windows` support
- :wrench: Configurable source code patching
- :zap: `Linux`, `macOS`, `Windows` support
- :wrench: Easy to extend with vendor mode and custom registries
- :books: Intelligent dependency management
- 📦 Self-contained `spc` executable (built with [box](https://github.com/box-project/box))
- :fire: Support 100+ popular [extensions](https://static-php.dev/en/guide/extensions.html)
- 📦 Self-contained `spc` executable for easy self-installation
- :fire: Support 100+ popular [PHP extensions](https://static-php.dev/en/guide/extensions.html)
- :floppy_disk: UPX compression support (reduces binary size by 30-50%)
**Single-file standalone php-cli:**
@@ -36,15 +41,15 @@ with popular extensions.
```bash
# For Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/nightly/spc-windows-x64.exe
```
For macOS and Linux, add execute permission first:
@@ -59,15 +64,14 @@ First, create a `craft.yml` file and specify which extensions you want to includ
```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.4
php-version: 8.5
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
- fpm
download-options:
prefer-pre-built: true
parallel: 10
```
Run command:
@@ -76,12 +80,12 @@ Run command:
./spc craft
# Output full console log
./spc craft --debug
./spc craft -vvv
```
### 3. Static PHP usage
Now you can copy binaries built by static-php-cli to another machine and run with no dependencies:
Now you can copy binaries built by StaticPHP to another machine and run with no dependencies:
```
# php-cli
@@ -91,48 +95,40 @@ buildroot/bin/php -v
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
# php-fpm
buildroot/bin/php-fpm -v
```
## Documentation
The current README contains basic usage. For all the features of static-php-cli,
see <https://static-php.dev> .
The current README contains basic usage. For the complete feature set of StaticPHP,
see <https://static-php.dev>.
## Direct Download
If you don't want to build or want to test first, you can download example pre-compiled artifact from [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml), or from self-hosted server.
If you do not want to build yet or just want to test first, you can download example pre-compiled artifacts from [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) or from a self-hosted server.
Below are several precompiled static-php binaries with different extension combinations,
which can be downloaded directly according to your needs.
We offer 2 types of extension sets for each PHP version:
| Combination | Extension Count | OS | Comment |
|----------------------------------------------------------------------|----------------------------------------------------------------------------|--------------|--------------------------------|
| [common](https://dl.static-php.dev/static-php-cli/common/) | [30+](https://dl.static-php.dev/static-php-cli/common/README.txt) | Linux, macOS | The binary size is about 7.5MB |
| [bulk](https://dl.static-php.dev/static-php-cli/bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | The binary size is about 25MB |
| [gnu-bulk](https://dl.static-php.dev/static-php-cli/gnu-bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | Using shared glibc |
| [minimal](https://dl.static-php.dev/static-php-cli/minimal/) | [5](https://dl.static-php.dev/static-php-cli/minimal/README.txt) | Linux, macOS | The binary size is about 3MB |
| [spc-min](https://dl.static-php.dev/static-php-cli/windows/spc-min/) | [5](https://dl.static-php.dev/static-php-cli/windows/spc-min/README.txt) | Windows | The binary size is about 3MB |
| [spc-max](https://dl.static-php.dev/static-php-cli/windows/spc-max/) | [40+](https://dl.static-php.dev/static-php-cli/windows/spc-max/README.txt) | Windows | The binary size is about 8.5MB |
- **gigantic**: Includes as many extensions as possible, the binary size is about 100-150MB.
- **base**: Only includes a few extensions used by StaticPHP itself, the binary size is about 10MB.
> Linux and Windows supports UPX compression for binaries, which can reduce the size of the binary by 30% to 50%.
> macOS does not support UPX compression, so the size of the pre-built binaries for mac is larger.
> WIP
### Build Online (using GitHub Actions)
When the above direct download binaries cannot meet your needs,
you can use GitHub Action to easily build a statically compiled PHP,
and at the same time define the extensions to be compiled by yourself.
When the direct-download binaries above cannot meet your needs,
you can use GitHub Actions to easily build a statically compiled PHP
while defining your own extension list.
1. Fork me.
1. Fork this repository.
2. Go to the Actions of the project and select `CI`.
3. Select `Run workflow`, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. `bcmath,curl,mbstring`)
4. After waiting for about a period of time, enter the corresponding task and get `Artifacts`.
4. After waiting for the workflow to finish, open the corresponding run and download `Artifacts`.
If you enable `debug`, all logs will be output at build time, including compiled logs, for troubleshooting.
> We are also planning to provide a reusable GitHub Actions workflow in the future,
> so that you can easily build static PHP in your own repository, without forking this project.
## Contribution
If the extension you need is missing, you can create an issue.
@@ -140,8 +136,6 @@ If you are familiar with this project, you are also welcome to initiate a pull r
If you want to contribute documentation, please just edit in `docs/`.
Now there is a [static-php](https://github.com/static-php) organization, which is used to store the repo related to the project.
## Sponsor this project
You can sponsor me or my project from [GitHub Sponsor](https://github.com/crazywhalecc). A portion of your donation will be used to maintain the **static-php.dev** server.
@@ -154,21 +148,9 @@ You can sponsor me or my project from [GitHub Sponsor](https://github.com/crazyw
## Open-Source License
This project itself is based on MIT License,
some newly added extensions and dependencies may originate from the the other projects,
and the headers of these code files will also be given additional instructions LICENSE and AUTHOR.
These are similar projects:
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs)
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli)
The project uses some code from [dixyes/lwmbs](https://github.com/dixyes/lwmbs), such as windows static build target and libiconv support.
lwmbs is licensed under the [Mulan PSL 2](http://license.coscl.org.cn/MulanPSL2).
Due to the special nature of this project,
many other open source projects such as curl and protobuf will be used during the project compilation process,
and they all have their own open source licenses.
This project itself is licensed under MIT.
Some newly added extensions and dependencies may originate from other projects.
The headers of those source files may also include additional LICENSE and AUTHOR information.
Please use the `bin/spc dump-license` command to export the open source licenses used in the project after compilation,
and comply with the corresponding project's LICENSE.

23
bin/spc
View File

@@ -1,13 +1,9 @@
#!/usr/bin/env php
<?php
use SPC\ConsoleApplication;
use SPC\exception\ExceptionHandler;
// Load custom php if exists
if (PHP_OS_FAMILY !== 'Windows' && PHP_BINARY !== (__DIR__ . '/php') && file_exists(__DIR__ . '/php') && is_executable(__DIR__ . '/php')) {
pcntl_exec(__DIR__ . '/php', $argv);
}
use StaticPHP\ConsoleApplication;
use StaticPHP\Exception\ExceptionHandler;
use StaticPHP\Exception\SPCException;
if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
// Current: ./bin (git/project mode)
@@ -17,11 +13,6 @@ if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__, 3) . '/autoload.php';
}
// 防止 Micro 打包状态下不支持中文的显示(虽然这个项目目前好像没输出过中文?)
if (PHP_OS_FAMILY === 'Windows' && Phar::running()) {
exec('CHCP 65001');
}
// Print deprecation notice on PHP < 8.4, use red and highlight background
if (PHP_VERSION_ID < 80400) {
echo "\e[43mDeprecation Notice: PHP < 8.4 is deprecated, please upgrade your PHP version.\e[0m\n";
@@ -29,7 +20,9 @@ if (PHP_VERSION_ID < 80400) {
try {
(new ConsoleApplication())->run();
} catch (Exception $e) {
ExceptionHandler::getInstance()->handle($e);
exit(1);
} catch (SPCException $e) {
exit(ExceptionHandler::handleSPCException($e));
} catch (\Throwable $e) {
exit(ExceptionHandler::handleDefaultException($e));
}

View File

@@ -3,7 +3,7 @@
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v6
SPC_DOCKER_VERSION=v7
# Detect docker can run
if ! which docker >/dev/null; then
@@ -122,6 +122,7 @@ COPY ./composer.* /app/
ADD ./bin /app/bin
RUN composer install --no-dev
ADD ./config /app/config
ADD ./spc.registry.yml /app/spc.registry.yml
RUN bin/spc doctor --auto-fix
RUN bin/spc install-pkg upx

12
bin/spc-debug Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Use SPC_XDEBUG=profile to enable Xdebug profiling mode, which will generate profiling files in /tmp.
# Otherwise, it will enable Xdebug debugging mode, which allows you to connect a debugger to port 9003.
if [ "$SPC_XDEBUG" = "profile" ]; then
XDEBUG_PREFIX="-d xdebug.mode=profile -d xdebug.start_with_request=yes -d xdebug.output_dir=/tmp -d xdebug.output_name=spc-profile.%t.%p.%r"
else
XDEBUG_PREFIX="-d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes"
fi
# This script runs the 'spc' command with Xdebug enabled for debugging purposes.
php $XDEBUG_PREFIX "$(dirname "$0")/../bin/spc" "$@"

12
bin/spc-debug.ps1 Normal file
View File

@@ -0,0 +1,12 @@
$PHP_Exec = ".\runtime\php.exe"
if (-not(Test-Path $PHP_Exec)) {
$PHP_Exec = Get-Command php.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Definition
if (-not $PHP_Exec) {
Write-Host "Error: PHP not found, you need to install PHP on your system or use 'bin/setup-runtime'." -ForegroundColor Red
exit 1
}
}
& "$PHP_Exec" -d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes ("bin/spc") @args
exit $LASTEXITCODE

View File

@@ -1,236 +0,0 @@
#!/usr/bin/env bash
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v6
# Detect docker can run
if ! which docker >/dev/null; then
echo "Docker is not installed, please install docker first !"
exit 1
fi
DOCKER_EXECUTABLE="docker"
# shellcheck disable=SC2046
if [ $(id -u) -ne 0 ]; then
if ! docker info > /dev/null 2>&1; then
if [ "$SPC_USE_SUDO" != "yes" ] && [ "$SPC_DOCKER_DEBUG" != "yes" ]; then
echo "Docker command requires sudo"
# shellcheck disable=SC2039
echo -n 'To use sudo to run docker, run "export SPC_USE_SUDO=yes" and run command again'
exit 1
fi
DOCKER_EXECUTABLE="sudo docker"
fi
fi
# Convert uname to gnu arch
CURRENT_ARCH=$(uname -m)
if [ "$CURRENT_ARCH" = "arm64" ]; then
CURRENT_ARCH=aarch64
fi
if [ -z "$SPC_USE_ARCH" ]; then
SPC_USE_ARCH=$CURRENT_ARCH
fi
# parse SPC_USE_ARCH
case $SPC_USE_ARCH in
x86_64|amd64)
SPC_USE_ARCH=x86_64
SPC_USE_ARCH_DOCKER=amd64
if [ "$CURRENT_ARCH" != "x86_64" ]; then
PLATFORM_ARG="--platform linux/amd64"
fi
;;
aarch64|arm64)
SPC_USE_ARCH=aarch64
SPC_USE_ARCH_DOCKER=arm64
if [ "$CURRENT_ARCH" != "aarch64" ]; then
PLATFORM_ARG="--platform linux/arm64"
fi
;;
*)
echo "Current arch is not supported to run in docker: $SPC_USE_ARCH"
exit 1
;;
esac
# detect if we need to use qemu-static
if [ "$SPC_USE_ARCH" != "$CURRENT_ARCH" ]; then
if [ "$(uname -s)" = "Linux" ]; then
echo "* Using different arch needs to setup qemu-static for docker !"
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static --reset -p yes > /dev/null
fi
fi
# Detect docker env is setup
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION; then
echo "Docker container does not exist. Building docker image ..."
$DOCKER_EXECUTABLE buildx build $PLATFORM_ARG -t cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
FROM centos:7
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
RUN yum clean all && \
yum makecache && \
yum update -y && \
localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN yum install -y centos-release-scl
RUN if [ "$SPC_USE_ARCH" = "aarch64" ]; then \
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo ; \
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo ; \
else \
sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo ; \
fi
RUN sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's|http://|https://|g' /etc/yum.repos.d/*.repo
RUN yum update -y && \
yum install -y devtoolset-10-gcc-* devtoolset-10-libatomic-devel
RUN echo "source scl_source enable devtoolset-10" >> /etc/bashrc
RUN source /etc/bashrc
RUN yum install -y which
RUN curl -o cmake.tgz -#fSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
mkdir /cmake && \
tar -xzf cmake.tgz -C /cmake --strip-components 1
WORKDIR /app
COPY ./composer.* /app/
ADD ./bin/setup-runtime /app/bin/setup-runtime
ADD ./bin/spc /app/bin/spc
RUN /app/bin/setup-runtime
ADD ./src /app/src
RUN /app/bin/php /app/bin/composer install --no-dev
ENV SPC_LIBC=glibc
ENV PATH="/app/bin:/cmake/bin:/opt/rh/devtoolset-10/root/usr/bin:\$PATH"
ADD ./config /app/config
RUN CC=gcc bin/spc doctor --auto-fix --debug
RUN bin/spc install-pkg upx
RUN if [ -f /app/buildroot/bin/re2c ]; then \
cp /app/buildroot/bin/re2c /usr/local/bin/re2c ;\
fi
RUN curl -o make.tgz -fsSL https://ftp.gnu.org/gnu/make/make-4.4.tar.gz && \
tar -zxvf make.tgz && \
cd make-4.4 && \
./configure && \
make && \
make install && \
ln -sf /usr/local/bin/make /usr/bin/make
RUN curl -o automake.tgz -fsSL https://ftp.gnu.org/gnu/automake/automake-1.17.tar.xz && \
tar -xvf automake.tgz && \
cd automake-1.17 && \
./configure && \
make && \
make install && \
ln -sf /usr/local/bin/automake /usr/bin/automake
RUN mv /app/pkgroot/\$(uname -m)-linux /app/pkgroot-private
ADD bin/docker-entrypoint.sh /bin/docker-entrypoint.sh
RUN chmod +x /bin/docker-entrypoint.sh
ENTRYPOINT ["/bin/docker-entrypoint.sh"]
EOF
fi
# Check if in ci (local terminal can execute with -it)
if [ -t 0 ]; then
INTERACT=-it
else
INTERACT=''
fi
# Mounting volumes
MOUNT_LIST=""
# shellcheck disable=SC2089
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/config:/app/config"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/src:/app/src"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/buildroot:/app/buildroot"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/source:/app/source"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/dist:/app/dist"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/downloads:/app/downloads"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/pkgroot:/app/pkgroot"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/log:/app/log"
if [ -f "$(pwd)/craft.yml" ]; then
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/craft.yml:/app/craft.yml"
fi
# Apply env in temp env file
echo 'SPC_DEFAULT_C_FLAGS=-fPIC' > /tmp/spc-gnu-docker.env
echo 'SPC_LIBC=glibc' >> /tmp/spc-gnu-docker.env
# Environment variable passthrough
ENV_LIST=""
ENV_LIST="$ENV_LIST -e SPC_FIX_DEPLOY_ROOT="$(pwd)""
if [ ! -z "$GITHUB_TOKEN" ]; then
ENV_LIST="$ENV_LIST -e GITHUB_TOKEN=$GITHUB_TOKEN"
fi
# Intercept and rewrite --with-frankenphp-app option, and mount host path to /app/app
FRANKENPHP_APP_PATH=""
NEW_ARGS=()
while [ $# -gt 0 ]; do
case "$1" in
--with-frankenphp-app=*)
FRANKENPHP_APP_PATH="${1#*=}"
NEW_ARGS+=("--with-frankenphp-app=/app/app")
shift
;;
--with-frankenphp-app)
if [ -n "${2:-}" ]; then
FRANKENPHP_APP_PATH="$2"
NEW_ARGS+=("--with-frankenphp-app=/app/app")
shift 2
else
NEW_ARGS+=("$1")
shift
fi
;;
*)
NEW_ARGS+=("$1")
shift
;;
esac
done
# Normalize the path and add mount if provided
if [ -n "$FRANKENPHP_APP_PATH" ]; then
# expand ~ to $HOME
if [ "${FRANKENPHP_APP_PATH#~}" != "$FRANKENPHP_APP_PATH" ]; then
FRANKENPHP_APP_PATH="$HOME${FRANKENPHP_APP_PATH#~}"
fi
# make absolute if relative
case "$FRANKENPHP_APP_PATH" in
/*) ABS_APP_PATH="$FRANKENPHP_APP_PATH" ;;
*) ABS_APP_PATH="$(pwd)/$FRANKENPHP_APP_PATH" ;;
esac
MOUNT_LIST="$MOUNT_LIST -v $ABS_APP_PATH:/app/app"
fi
# Run docker
# shellcheck disable=SC2068
# shellcheck disable=SC2086
# shellcheck disable=SC2090
if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
echo "* Debug mode enabled, run docker in interactive mode."
echo "* You can use 'exit' to exit the docker container."
echo "* You can use 'bin/spc' like normal builds."
echo "*"
echo "* Mounted directories:"
echo "* ./config: $(pwd)/config"
echo "* ./src: $(pwd)/src"
echo "* ./buildroot: $(pwd)/buildroot"
echo "* ./source: $(pwd)/source"
echo "* ./dist: $(pwd)/dist"
echo "* ./downloads: $(pwd)/downloads"
echo "* ./pkgroot: $(pwd)/pkgroot"
echo "*"
set -ex
$DOCKER_EXECUTABLE run $PLATFORM_ARG --privileged --rm -it $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
else
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc "${NEW_ARGS[@]}"
fi

View File

@@ -1,19 +1,23 @@
{
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"directories": [
"config",
"src",
"vendor/psr",
"vendor/laravel/prompts",
"vendor/illuminate",
"vendor/symfony",
"vendor/zhamao"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"check-requirements": false,
"directories": [
"config",
"src",
"vendor/psr",
"vendor/laravel/prompts",
"vendor/symfony",
"vendor/php-di",
"vendor/zhamao"
],
"files": [
"spc.registry.yml"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
}

View File

@@ -3,7 +3,7 @@
"enabled": true,
"actions": [
{
"action": "composer analyse"
"action": "php vendor/bin/phpstan analyse --memory-limit 300M"
}
]
},
@@ -11,13 +11,22 @@
"enabled": true,
"actions": [
{
"action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"action": "php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php} --sequential",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
},
{
"action": "bin/spc dev:lint-config --check",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\InDirectory",
"args": ["config"]
}
]
}
]
},

View File

@@ -9,26 +9,28 @@
}
],
"require": {
"php": ">= 8.3",
"php": ">=8.4",
"ext-mbstring": "*",
"ext-zlib": "*",
"laravel/prompts": "^0.1.12",
"laravel/prompts": "~0.1",
"php-di/php-di": "^7.1",
"symfony/console": "^5.4 || ^6 || ^7",
"symfony/process": "^7.2",
"symfony/yaml": "^7.2",
"zhamao/logger": "^1.1.3"
"zhamao/logger": "^1.1.4"
},
"require-dev": {
"captainhook/captainhook-phar": "^5.23",
"captainhook/hook-installer": "^1.0",
"friendsofphp/php-cs-fixer": "^3.60",
"humbug/box": "^4.5.0 || ^4.6.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10.3 || ^9.5"
},
"autoload": {
"psr-4": {
"SPC\\": "src/SPC"
"StaticPHP\\": "src/StaticPHP",
"Package\\": "src/Package"
},
"files": [
"src/globals/defines.php",
@@ -37,7 +39,7 @@
},
"autoload-dev": {
"psr-4": {
"SPC\\Tests\\": "tests/SPC"
"Tests\\StaticPHP\\": "tests/StaticPHP"
}
},
"bin": [
@@ -46,6 +48,7 @@
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M",
"cs-fix": "php-cs-fixer fix",
"lint-config": "php bin/spc dev:lint-config",
"test": "vendor/bin/phpunit tests/ --no-coverage",
"build:phar": "vendor/bin/box compile"
},
@@ -59,6 +62,9 @@
"optimize-autoloader": true,
"sort-packages": true
},
"suggest": {
"ext-yaml": "Speeds up YAML config file parsing"
},
"funding": [
{
"type": "other",

994
composer.lock generated

File diff suppressed because it is too large Load Diff

9
config/artifact/glfw.yml Normal file
View File

@@ -0,0 +1,9 @@
glfw:
metadata:
license-files:
- LICENSE
license: MIT
source:
type: git
url: 'https://github.com/mario-deluna/php-glfw'
rev: master

View File

@@ -0,0 +1,2 @@
musl-wrapper:
source: 'https://musl.libc.org/releases/musl-1.2.5.tar.gz'

View File

@@ -0,0 +1,8 @@
ncurses:
metadata:
license-files:
- COPYING
source:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/ncurses/'
regex: '/href="(?<file>ncurses-(?<version>[^"]+)\.tar\.gz)"/'

View File

@@ -0,0 +1,11 @@
php-src:
metadata:
license-files:
- LICENSE
license: PHP-3.01
source:
type: php-release
domain: 'https://www.php.net'
source-mirror:
type: php-release
domain: 'https://phpmirror.static-php.dev'

View File

@@ -32,9 +32,10 @@
; GNU_ARCH: the GNU arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`)
; MAC_ARCH: the MAC arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `arm64`)
; PKG_CONFIG: (*nix only) static-php-cli will set `$BUILD_BIN_PATH/pkg-config` to PKG_CONFIG.
; SPC_LINUX_DEFAULT_CC: (linux only) the default compiler for linux. (For alpine linux: `gcc`, default: `$GNU_ARCH-linux-musl-gcc`)
; SPC_LINUX_DEFAULT_CXX: (linux only) the default c++ compiler for linux. (For alpine linux: `g++`, default: `$GNU_ARCH-linux-musl-g++`)
; SPC_LINUX_DEFAULT_AR: (linux only) the default archiver for linux. (For alpine linux: `ar`, default: `$GNU_ARCH-linux-musl-ar`)
; SPC_DEFAULT_CC: (*nix only) the default compiler for selected toolchain.
; SPC_DEFAULT_CXX: (*nix only) the default c++ compiler selected toolchain.
; SPC_DEFAULT_AR: (*nix only) the default archiver for selected toolchain.
; SPC_DEFAULT_LD: (*nix only) the default linker for selected toolchain.
; SPC_EXTRA_PHP_VARS: (linux only) the extra vars for building php, used in `configure` and `make` command.
[global]
@@ -47,7 +48,13 @@ SPC_SKIP_DOCTOR_CHECK_ITEMS=""
; extra modules that xcaddy will include in the FrankenPHP build
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli"
; The display message for php version output (PHP >= 8.4 available)
PHP_BUILD_PROVIDER="static-php-cli ${SPC_VERSION}"
PHP_BUILD_PROVIDER="StaticPHP ${SPC_VERSION}"
; Whether to enable log file (if you are using vendor mode)
SPC_ENABLE_LOG_FILE="yes"
; The LOG DIR for spc logs
SPC_LOGS_DIR="${WORKING_DIR}/log"
; Preserve old logs when running new builds
SPC_PRESERVE_LOGS="no"
; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them
; only useful for builds targeting not pure-static linking
@@ -76,7 +83,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
; - gnu-native: used for general linux distros, can build gnu target for the installed glibc version only.
; option to specify the target, superceded by SPC_TARGET if set
SPC_LIBC=musl
; SPC_LIBC=musl
; uncomment to link libc dynamically on musl
; SPC_MUSL_DYNAMIC=true
@@ -87,17 +94,18 @@ SPC_LIBC=musl
; `native-native` - links against system libc dynamically
; `native-native-musl` - links against musl libc statically
; `native-native-musl -dynamic` - links against musl libc dynamically
; SPC_TARGET=
SPC_TARGET=${GNU_ARCH}-linux-musl
; compiler environments
CC=${SPC_LINUX_DEFAULT_CC}
CXX=${SPC_LINUX_DEFAULT_CXX}
AR=${SPC_LINUX_DEFAULT_AR}
LD=${SPC_LINUX_DEFAULT_LD}
; compiler environments (default value is defined by selected toolchain)
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
RANLIB=${SPC_DEFAULT_RANLIB}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
SPC_DEFAULT_LD_FLAGS=""
SPC_DEFAULT_CFLAGS="-fPIC -O3 -pipe -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections -Wno-unused-command-line-argument"
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
SPC_DEFAULT_LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,-z,noexecstack -Wl,--gc-sections"
; upx executable path
UPX_EXEC=${PKG_ROOT_PATH}/bin/upx
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
@@ -107,15 +115,19 @@ SPC_MICRO_PATCHES=cli_checks,disable_huge_page
; buildconf command
SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
; configure command
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --with-pic"
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --enable-rtld-now --enable-re2c-cgoto --disable-rpath --with-pic"
; *** default build vars for building php ***
; embed type for php, static (libphp.a) or shared (libphp.so)
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
; EXTRA_CFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE ${SPC_DEFAULT_C_FLAGS}"
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CFLAGS}"
; EXTRA_CXXFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CXXFLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; EXTRA_LDFLAGS_PROGRAM for `make` php; appended only to SAPI executable links (cli/fpm/cgi/micro/embed). Used by PGO to inject -fprofile-use= without polluting libphp.{a,so}.
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM=""
; optional, path to openssl conf. This affects where openssl will look for the default CA.
; default on Debian/Alpine: /etc/ssl, default on RHEL: /etc/pki/tls
@@ -125,15 +137,18 @@ OPENSSLDIR=""
; build target: macho or macho (possibly we could support macho-universal in the future)
; Currently we do not support universal and cross-compilation for macOS.
SPC_TARGET=native-macos
; compiler environments
CC=clang
CXX=clang++
AR=ar
LD=ld
; Whether to use brew version of llvm or system version (valid options: 'system', 'brew', default: 'system')
SPC_USE_LLVM=system
; compiler environments (default value is defined by selected toolchain)
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
RANLIB=${SPC_DEFAULT_RANLIB}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_LD_FLAGS=""
SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
SPC_DEFAULT_LDFLAGS="-Wl,-dead_strip"
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
SPC_MICRO_PATCHES=cli_checks,macos_iconv
@@ -141,17 +156,18 @@ SPC_MICRO_PATCHES=cli_checks,macos_iconv
; buildconf command
SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
; configure command
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-phpdbg"
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --enable-rtld-now --enable-re2c-cgoto --disable-rpath --with-pic"
; *** default build vars for building php ***
; embed type for php, static (libphp.a) or shared (libphp.dylib)
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
; EXTRA_CFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -Werror=unknown-warning-option ${SPC_DEFAULT_C_FLAGS}"
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -fvisibility=hidden -fvisibility-inlines-hidden -Werror=unknown-warning-option ${SPC_DEFAULT_CFLAGS}"
; EXTRA_CXXFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fpie -fvisibility=hidden -fvisibility-inlines-hidden -Werror=unknown-warning-option ${SPC_DEFAULT_CXXFLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.dylib
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; EXTRA_LDFLAGS_PROGRAM for `make` php; appended only to SAPI executable links (cli/fpm/cgi/micro/embed). Used by PGO to inject -fprofile-use= without polluting libphp.{a,dylib}.
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM=""
; minimum compatible macOS version (LLVM vars, availability not guaranteed)
MACOSX_DEPLOYMENT_TARGET=12.0
[freebsd]
; compiler environments
CC=clang
CXX=clang++

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,105 +0,0 @@
{
"go-xcaddy-aarch64-linux": {
"type": "custom"
},
"go-xcaddy-aarch64-macos": {
"type": "custom"
},
"go-xcaddy-x86_64-linux": {
"type": "custom"
},
"go-xcaddy-x86_64-macos": {
"type": "custom"
},
"musl-toolchain-aarch64-linux": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/musl-toolchain/aarch64-musl-toolchain.tgz"
},
"musl-toolchain-x86_64-linux": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/musl-toolchain/x86_64-musl-toolchain.tgz"
},
"nasm-x86_64-win": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/nasm/nasm-2.16.01-win64.zip",
"extract-files": {
"nasm.exe": "{php_sdk_path}/bin/nasm.exe",
"ndisasm.exe": "{php_sdk_path}/bin/ndisasm.exe"
}
},
"pkg-config-aarch64-linux": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-aarch64-linux-musl-1.2.5.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-aarch64-macos": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-aarch64-darwin.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-x86_64-linux": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-x86_64-linux-musl-1.2.5.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-x86_64-macos": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-x86_64-darwin.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"strawberry-perl-x86_64-win": {
"type": "url",
"url": "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_5380_5361/strawberry-perl-5.38.0.1-64bit-portable.zip"
},
"upx-aarch64-linux": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-arm64_linux\\.tar\\.xz",
"extract-files": {
"upx": "{pkg_root_path}/bin/upx"
}
},
"upx-x86_64-linux": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-amd64_linux\\.tar\\.xz",
"extract-files": {
"upx": "{pkg_root_path}/bin/upx"
}
},
"upx-x86_64-win": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-win64\\.zip",
"extract-files": {
"upx.exe": "{pkg_root_path}/bin/upx.exe"
}
},
"zig-aarch64-linux": {
"type": "custom"
},
"zig-aarch64-macos": {
"type": "custom"
},
"zig-x86_64-linux": {
"type": "custom"
},
"zig-x86_64-macos": {
"type": "custom"
},
"zig-x86_64-win": {
"type": "custom"
}
}

View File

@@ -0,0 +1,380 @@
ext-bcmath:
type: php-extension
ext-bz2:
type: php-extension
depends:
- bzip2
php-extension:
arg-type@unix: with-path
arg-type@windows: with
ext-calendar:
type: php-extension
ext-com_dotnet:
type: php-extension
php-extension:
os:
- Windows
arg-type@windows: '--enable-com-dotnet=yes'
ext-ctype:
type: php-extension
ext-curl:
type: php-extension
depends:
- curl
depends@windows:
- curl
- ext-zlib
- ext-openssl
php-extension:
arg-type: with
ext-dba:
type: php-extension
suggests:
- qdbm
php-extension:
arg-type: custom
ext-dom:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type: enable
arg-type@windows: with
ext-exif:
type: php-extension
depends@windows:
- ext-mbstring
ext-ffi:
type: php-extension
depends@unix:
- libffi
depends@windows:
- libffi-win
php-extension:
arg-type@unix: '--with-ffi=@shared_suffix@ --enable-zend-signals'
arg-type@windows: with
ext-fileinfo:
type: php-extension
ext-filter:
type: php-extension
ext-ftp:
type: php-extension
suggests:
- ext-openssl
ext-gd:
type: php-extension
depends:
- zlib
- libpng
- ext-zlib
suggests:
- libavif
- libwebp
- libjpeg
- freetype
php-extension:
arg-type: custom
arg-type@windows: with
ext-gettext:
type: php-extension
depends@unix:
- gettext
depends@windows:
- gettext-win
php-extension:
arg-type: with-path
arg-type@windows: with
ext-gmp:
type: php-extension
depends@unix:
- gmp
depends@windows:
- mpir
php-extension:
arg-type: with-path
arg-type@windows: with
ext-iconv:
type: php-extension
depends@unix:
- libiconv
depends@windows:
- libiconv-win
php-extension:
arg-type@unix: with-path
arg-type@windows: with
ext-intl:
type: php-extension
depends:
- icu
ext-ldap:
type: php-extension
depends:
- ldap
suggests:
- gmp
- libsodium
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: with-path
arg-type@windows: with
ext-libxml:
type: php-extension
depends:
- libxml2
php-extension:
build-with-php: true
build-shared: false
arg-type@unix: with-path
arg-type@windows: with
ext-mbregex:
type: php-extension
depends:
- onig
- ext-mbstring
php-extension:
arg-type: custom
build-shared: false
build-static: true
display-name: mbstring
ext-mbstring:
type: php-extension
php-extension:
arg-type: custom
ext-mysqli:
type: php-extension
depends:
- ext-mysqlnd
php-extension:
arg-type: with
build-with-php: true
ext-mysqlnd:
type: php-extension
depends:
- zlib
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-odbc:
type: php-extension
depends@unix:
- unixodbc
php-extension:
arg-type@unix: '--with-unixODBC@shared_path_suffix@'
arg-type@windows: enable
ext-opcache:
type: php-extension
php-extension:
arg-type@unix: custom
arg-type@windows: enable
zend-extension: true
display-name: 'Zend Opcache'
ext-openssl:
type: php-extension
depends:
- openssl
- zlib
- ext-zlib
php-extension:
arg-type: custom
arg-type@windows: with
build-with-php: true
ext-password-argon2:
type: php-extension
depends:
- libargon2
suggests:
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: custom
display-name: ''
ext-pcntl:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-pdo:
type: php-extension
ext-pdo_mysql:
type: php-extension
depends:
- ext-pdo
- ext-mysqlnd
php-extension:
arg-type: with
ext-pdo_odbc:
type: php-extension
depends:
- ext-pdo
depends@unix:
- unixodbc
- ext-pdo
- ext-odbc
php-extension:
arg-type: custom
ext-pdo_pgsql:
type: php-extension
depends:
- ext-pdo
- ext-pgsql
- postgresql
php-extension:
arg-type@unix: with-path
arg-type@windows: '--with-pdo-pgsql=yes'
ext-pdo_sqlite:
type: php-extension
depends:
- ext-pdo
- ext-sqlite3
- sqlite
php-extension:
arg-type: with
ext-pgsql:
type: php-extension
depends:
- postgresql
php-extension:
arg-type: custom
ext-phar:
type: php-extension
depends:
- zlib
ext-posix:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-readline:
type: php-extension
depends@unix:
- libedit
depends@windows:
- wineditline
php-extension:
arg-type: '--with-libedit --without-readline'
arg-type@windows: with
build-shared: false
build-static: true
ext-session:
type: php-extension
ext-shmop:
type: php-extension
php-extension:
build-with-php: true
ext-simplexml:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-snmp:
type: php-extension
depends:
- net-snmp
php-extension:
os:
- Linux
- Darwin
arg-type: with
ext-soap:
type: php-extension
depends:
- ext-xml
- ext-session
php-extension:
arg-type: enable
build-with-php: true
ext-sockets:
type: php-extension
ext-sodium:
type: php-extension
depends:
- libsodium
php-extension:
arg-type: with
ext-sqlite3:
type: php-extension
depends:
- sqlite
php-extension:
arg-type@unix: with-path
arg-type@windows: with
build-with-php: true
ext-sysvmsg:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-sysvsem:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-sysvshm:
type: php-extension
ext-tidy:
type: php-extension
depends:
- tidy
php-extension:
arg-type: with-path
ext-tokenizer:
type: php-extension
php-extension:
build-with-php: true
ext-xml:
type: php-extension
depends:
- ext-libxml
depends@windows:
- ext-iconv
- ext-libxml
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-xmlreader:
type: php-extension
depends:
- ext-xml
- ext-dom
php-extension:
arg-type: enable
build-with-php: true
ext-xmlwriter:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type: enable
build-with-php: true
ext-xsl:
type: php-extension
depends:
- libxslt
- ext-xml
- ext-dom
php-extension:
arg-type: with-path
build-with-php: true
ext-zlib:
type: php-extension
depends:
- zlib
php-extension:
arg-type: custom
arg-type@windows: enable
build-with-php: true
build-shared: false

View File

@@ -0,0 +1,17 @@
ext-amqp:
type: php-extension
artifact:
source:
type: pecl
name: amqp
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- librabbitmq
depends@windows:
- librabbitmq
- ext-openssl
php-extension:
arg-type: '--with-amqp@shared_suffix@ --with-librabbitmq-dir=@build_root_path@'
arg-type@windows: '--with-amqp'

View File

@@ -0,0 +1,9 @@
ext-apcu:
type: php-extension
artifact:
source:
type: pecl
name: APCu
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -0,0 +1,9 @@
ext-ast:
type: php-extension
artifact:
source:
type: pecl
name: ast
metadata:
license-files: [LICENSE]
license: BSD-3-Clause

View File

@@ -0,0 +1,13 @@
ext-brotli:
type: php-extension
artifact:
source:
type: git
extract: php-src/ext/brotli
rev: master
url: 'https://github.com/kjdev/php-ext-brotli'
metadata:
license-files: [LICENSE]
license: MIT
depends:
- brotli

View File

@@ -0,0 +1,19 @@
ext-clickhouse:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/php_clickhouse
extract: php-src/ext/clickhouse
prefer-stable: true
metadata:
license-files: [LICENSE]
license: PHP-3.01
suggests@unix:
- openssl
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type@unix: custom

View File

@@ -0,0 +1,16 @@
ext-decimal:
type: php-extension
artifact:
source:
type: ghtagtar
repo: php-decimal/ext-decimal
match: 'v2\.\d.*'
extract: php-src/ext/decimal
metadata:
license-files: [LICENSE]
license: MIT
depends:
- libmpdec
php-extension:
arg-type@unix: '--enable-decimal --with-libmpdec-path=@build_root_path@'
arg-type@windows: '--with-decimal'

View File

@@ -0,0 +1,10 @@
ext-deepclone:
type: php-extension
artifact:
source:
type: ghtagtar
repo: symfony/php-ext-deepclone
extract: php-src/ext/deepclone
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -0,0 +1,9 @@
ext-dio:
type: php-extension
artifact:
source:
type: pecl
name: dio
metadata:
license-files: [LICENSE]
license: PHP-3.01

11
config/pkg/ext/ext-ds.yml Normal file
View File

@@ -0,0 +1,11 @@
ext-ds:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/php-ds/ext-ds.git'
rev: master
extract: php-src/ext/ds
metadata:
license-files: [LICENSE]
license: MIT

13
config/pkg/ext/ext-ev.yml Normal file
View File

@@ -0,0 +1,13 @@
ext-ev:
type: php-extension
artifact:
source:
type: pecl
name: ev
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- ext-sockets
php-extension:
arg-type@windows: with

View File

@@ -0,0 +1,20 @@
ext-event:
type: php-extension
artifact:
source:
type: url
url: 'https://bitbucket.org/osmanov/pecl-event/get/3.1.4.tar.gz'
extract: php-src/ext/event
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libevent
- ext-openssl
suggests:
- ext-sockets
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -0,0 +1,13 @@
ext-excimer:
type: php-extension
artifact:
source:
type: pecl
name: excimer
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
os:
- Linux
- Darwin

View File

@@ -0,0 +1,20 @@
ext-fastchart:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastchart
extract: php-src/ext/fastchart
prefer-stable: true
metadata:
license-files: [LICENSE]
depends:
- freetype
suggests:
- libpng
- libjpeg
- libwebp
php-extension:
os:
- Linux
- Darwin

View File

@@ -0,0 +1,14 @@
ext-fastjson:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastjson
extract: php-src/ext/fastjson
prefer-stable: true
metadata:
license-files: [LICENSE]
php-extension:
os:
- Linux
- Darwin

View File

@@ -0,0 +1,16 @@
ext-gearman:
type: php-extension
artifact:
source:
type: pecl
name: gearman
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libgearman
php-extension:
os:
- Linux
- Darwin
arg-type: '--with-gearman@shared_path_suffix@'

View File

@@ -0,0 +1,7 @@
ext-glfw:
type: php-extension
artifact: glfw
depends:
- glfw
php-extension:
arg-type@unix: '--enable-glfw --with-glfw-dir=@build_root_path@'

View File

@@ -0,0 +1,12 @@
ext-gmssl:
type: php-extension
artifact:
source:
type: ghtar
repo: gmssl/GmSSL-PHP
extract: php-src/ext/gmssl
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- gmssl

View File

@@ -0,0 +1,17 @@
ext-grpc:
type: php-extension
artifact:
source:
type: pecl
name: grpc
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- grpc
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type@unix: enable-path

View File

@@ -0,0 +1,12 @@
ext-igbinary:
type: php-extension
artifact:
source:
type: pecl
name: igbinary
metadata:
license-files: [COPYING]
license: BSD-3-Clause
suggests:
- ext-session
- ext-apcu

View File

@@ -0,0 +1,16 @@
ext-imagick:
type: php-extension
artifact:
source:
type: pecl
name: imagick
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- imagemagick
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -0,0 +1,18 @@
ext-imap:
type: php-extension
artifact:
source:
type: pecl
name: imap
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- imap
suggests:
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -0,0 +1,12 @@
ext-inotify:
type: php-extension
artifact:
source:
type: pecl
name: inotify
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
os:
- Linux

View File

@@ -0,0 +1,16 @@
ext-lz4:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-lz4.git'
rev: master
extract: php-src/ext/lz4
metadata:
license-files: [LICENSE]
license: MIT
depends:
- liblz4
php-extension:
arg-type@unix: '--enable-lz4=@shared_suffix@ --with-lz4-includedir=@build_root_path@'
arg-type@windows: '--enable-lz4'

View File

@@ -0,0 +1,13 @@
ext-maxminddb:
type: php-extension
artifact:
source:
type: pecl
name: maxminddb
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- libmaxminddb
php-extension:
arg-type: with

View File

@@ -0,0 +1,17 @@
ext-memcache:
type: php-extension
artifact:
source:
type: pecl
name: memcache
metadata:
license-files: [LICENSE]
license: PHP-3.0
depends:
- ext-zlib
- ext-session
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-memcache@shared_suffix@ --with-zlib-dir=@build_root_path@'

View File

@@ -0,0 +1,26 @@
ext-memcached:
type: php-extension
artifact:
source:
type: pecl
name: memcached
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libmemcached
depends@unix:
- libmemcached
- fastlz
- ext-session
- ext-zlib
suggests:
- zstd
- ext-igbinary
- ext-msgpack
- ext-session
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-memcached@shared_suffix@ --with-zlib-dir=@build_root_path@'

View File

@@ -0,0 +1,24 @@
ext-mongodb:
type: php-extension
artifact:
source:
type: ghrel
repo: mongodb/mongo-php-driver
match: mongodb.+\.tgz
extract: php-src/ext/mongodb
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@windows:
- ext-openssl
suggests@unix:
- icu
- openssl
- zstd
- zlib
frameworks:
- CoreFoundation
- Security
php-extension:
arg-type@unix: custom
arg-type@windows: '--enable-mongodb --with-mongodb-client-side-encryption'

View File

@@ -0,0 +1,14 @@
ext-msgpack:
type: php-extension
artifact:
source:
type: pecl
name: msgpack
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-session
php-extension:
arg-type@unix: with
arg-type@windows: enable

View File

@@ -0,0 +1,18 @@
ext-mysqlnd_ed25519:
type: php-extension
artifact:
source:
type: pie
repo: mariadb/mysqlnd_ed25519
extract: php-src/ext/mysqlnd_ed25519
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-mysqlnd
- libsodium
suggests:
- openssl
php-extension:
arg-type: '--with-mysqlnd_ed25519=@shared_suffix@'
build-static: false

View File

@@ -0,0 +1,17 @@
ext-mysqlnd_parsec:
type: php-extension
artifact:
source:
type: pie
repo: mariadb/mysqlnd_parsec
extract: php-src/ext/mysqlnd_parsec
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-mysqlnd
- libsodium
- openssl
php-extension:
arg-type: '--enable-mysqlnd_parsec'
build-static: false

View File

@@ -0,0 +1,9 @@
ext-opentelemetry:
type: php-extension
artifact:
source:
type: pecl
name: opentelemetry
metadata:
license-files: [LICENSE]
license: Apache-2.0

View File

@@ -0,0 +1,13 @@
ext-parallel:
type: php-extension
artifact:
source:
type: pecl
name: parallel
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@windows:
- pthreads4w
php-extension:
arg-type@windows: with

View File

@@ -0,0 +1,12 @@
ext-pcov:
type: php-extension
artifact:
source:
type: pecl
name: pcov
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
build-static: false
build-shared: true

View File

@@ -0,0 +1,14 @@
ext-pdo_sqlsrv:
type: php-extension
artifact:
source:
type: pecl
name: pdo_sqlsrv
metadata:
license-files: [LICENSE]
license: MIT
depends:
- ext-pdo
- ext-sqlsrv
php-extension:
arg-type: with

View File

@@ -0,0 +1,13 @@
ext-protobuf:
type: php-extension
artifact:
source:
type: pecl
name: protobuf
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
php-extension:
os:
- Linux
- Darwin

View File

@@ -0,0 +1,12 @@
ext-rar:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/static-php/php-rar.git'
rev: issue-php82
extract: php-src/ext/rar
metadata:
license-files: [LICENSE]
license: PHP-3.01
lang: cpp

View File

@@ -0,0 +1,18 @@
ext-rdkafka:
type: php-extension
artifact:
source:
type: ghtar
repo: php-rdkafka/php-rdkafka
extract: php-src/ext/rdkafka
metadata:
license-files: [LICENSE]
license: MIT
depends:
- librdkafka
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -0,0 +1,21 @@
ext-redis:
type: php-extension
artifact:
source:
type: pecl
name: redis
metadata:
license-files: [LICENSE]
license: PHP-3.01
suggests:
- ext-session
- ext-igbinary
- ext-msgpack
suggests@unix:
- ext-session
- ext-igbinary
- ext-msgpack
- zstd
- liblz4
php-extension:
arg-type: custom

View File

@@ -0,0 +1,10 @@
ext-simdjson:
type: php-extension
artifact:
source:
type: pecl
name: simdjson
metadata:
license-files: [LICENSE]
license: Apache-2.0
lang: cpp

View File

@@ -0,0 +1,19 @@
ext-snappy:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-snappy'
rev: master
extract: php-src/ext/snappy
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- snappy
suggests:
- ext-apcu
lang: cpp
php-extension:
arg-type@unix: '--enable-snappy --with-snappy-includedir=@build_root_path@'
arg-type@windows: '--enable-snappy'

View File

@@ -0,0 +1,17 @@
ext-spx:
type: php-extension
artifact:
source:
type: pie
repo: noisebynorthwest/php-spx
extract: php-src/ext/spx
metadata:
license-files: [LICENSE]
license: GPL-3.0-or-later
depends:
- ext-zlib
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-SPX@shared_suffix@'

View File

@@ -0,0 +1,15 @@
ext-sqlsrv:
type: php-extension
artifact:
source:
type: pecl
name: sqlsrv
metadata:
license-files: [LICENSE]
license: MIT
depends@linux:
- unixodbc
- ext-pcntl
depends@macos:
- unixodbc
lang: cpp

View File

@@ -0,0 +1,15 @@
ext-ssh2:
type: php-extension
artifact:
source:
type: pecl
name: ssh2
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libssh2
- ext-openssl
- ext-zlib
php-extension:
arg-type: with-path

View File

@@ -0,0 +1,86 @@
ext-swoole:
type: php-extension
artifact:
source:
type: ghtar
repo: swoole/swoole-src
extract: php-src/ext/swoole
prefer-stable: true
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- libcares
- brotli
- nghttp2
- zlib
- ext-openssl
- ext-curl
suggests:
- zstd
- ext-sockets
- ext-swoole-hook-pgsql
- ext-swoole-hook-mysql
- ext-swoole-hook-sqlite
- ext-swoole-hook-odbc
suggests@linux:
- zstd
- liburing
- ext-sockets
- ext-swoole-hook-pgsql
- ext-swoole-hook-mysql
- ext-swoole-hook-sqlite
- ext-swoole-hook-odbc
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type: custom
ext-swoole-hook-mysql:
type: php-extension
depends:
- ext-mysqlnd
- ext-pdo
- ext-pdo_mysql
suggests:
- ext-mysqli
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-odbc:
type: php-extension
depends:
- ext-pdo
- unixodbc
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-pgsql:
type: php-extension
depends:
- ext-pgsql
- ext-pdo
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-sqlite:
type: php-extension
depends:
- ext-sqlite3
- ext-pdo
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole

View File

@@ -0,0 +1,19 @@
ext-swow:
type: php-extension
artifact:
source:
extract: php-src/ext/swow-src
type: ghtar
repo: swow/swow
prefer-stable: true
metadata:
license: Apache-2.0
license-files: [LICENSE]
suggests:
- openssl
- curl
- ext-openssl
- ext-curl
- postgresql
php-extension:
arg-type: custom

View File

@@ -0,0 +1,11 @@
ext-trader:
type: php-extension
artifact:
source:
type: pecl
name: trader
metadata:
license-files: [LICENSE]
license: BSD-2-Clause
php-extension:
arg-type: enable

View File

@@ -0,0 +1,16 @@
ext-uuid:
type: php-extension
artifact:
source:
type: pecl
name: uuid
metadata:
license-files: [LICENSE]
license: LGPL-2.1-only
depends:
- libuuid
php-extension:
os:
- Linux
- Darwin
arg-type: with-path

15
config/pkg/ext/ext-uv.yml Normal file
View File

@@ -0,0 +1,15 @@
ext-uv:
type: php-extension
artifact:
source:
type: pecl
name: uv
prefer-stable: false
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libuv
- ext-sockets
php-extension:
arg-type: with-path

View File

@@ -0,0 +1,17 @@
ext-xdebug:
type: php-extension
artifact:
source:
type: pie
repo: xdebug/xdebug
metadata:
license-files: [LICENSE]
license: Xdebug-1.03
php-extension:
os:
- Linux
- Darwin
zend-extension: true
build-static: false
build-shared: true
build-with-php: false

View File

@@ -0,0 +1,18 @@
ext-xhprof:
type: php-extension
artifact:
source:
type: pecl
name: xhprof
extract: php-src/ext/xhprof-src
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- ext-ctype
php-extension:
os:
- Linux
- Darwin
arg-type: enable
build-with-php: true

View File

@@ -0,0 +1,17 @@
ext-xlswriter:
type: php-extension
artifact:
source:
type: pecl
name: xlswriter
metadata:
license-files: [LICENSE]
license: BSD-2-Clause
depends:
- ext-zlib
- ext-zip
suggests:
- openssl
php-extension:
arg-type: custom
arg-type@windows: '--with-xlswriter'

16
config/pkg/ext/ext-xz.yml Normal file
View File

@@ -0,0 +1,16 @@
ext-xz:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/codemasher/php-ext-xz'
rev: main
extract: php-src/ext/xz
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- xz
php-extension:
arg-type: with-path
arg-type@windows: enable

View File

@@ -0,0 +1,14 @@
ext-yac:
type: php-extension
artifact:
source:
type: pecl
name: yac
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@unix:
- fastlz
- ext-igbinary
php-extension:
arg-type@unix: '--enable-yac@shared_suffix@ --enable-igbinary --enable-json --with-system-fastlz'

View File

@@ -0,0 +1,16 @@
ext-yaml:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/php/pecl-file_formats-yaml'
rev: php7
extract: php-src/ext/yaml
metadata:
license-files: [LICENSE]
license: MIT
depends:
- libyaml
php-extension:
arg-type@unix: with-path
arg-type@windows: with

View File

@@ -0,0 +1,15 @@
ext-zip:
type: php-extension
artifact:
source:
type: pecl
name: zip
extract: ext-zip
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libzip
php-extension:
arg-type: custom
arg-type@windows: enable

View File

@@ -0,0 +1,18 @@
ext-zstd:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-zstd'
rev: master
extract: php-src/ext/zstd
metadata:
license-files: [LICENSE]
license: MIT
depends:
- zstd
suggests:
- ext-apcu
php-extension:
arg-type: '--enable-zstd --with-libzstd=@build_root_path@'
arg-type@windows: '--enable-zstd'

10
config/pkg/lib/attr.yml Normal file
View File

@@ -0,0 +1,10 @@
attr:
type: library
artifact:
source: 'https://download.savannah.nongnu.org/releases/attr/attr-2.5.2.tar.gz'
source-mirror: 'https://mirror.souseiseki.middlendian.com/nongnu/attr/attr-2.5.2.tar.gz'
metadata:
license-files: [doc/COPYING.LGPL]
license: LGPL-2.1-or-later
static-libs@unix:
- libattr.a

20
config/pkg/lib/brotli.yml Normal file
View File

@@ -0,0 +1,20 @@
brotli:
type: library
artifact:
source:
type: ghtagtar
repo: google/brotli
match: 'v1\.\d.*'
metadata:
license-files: [LICENSE]
license: MIT
headers:
- brotli
pkg-configs:
- libbrotlicommon
- libbrotlidec
- libbrotlienc
static-libs@windows:
- brotlicommon.lib
- brotlidec.lib
- brotlienc.lib

20
config/pkg/lib/bzip2.yml Normal file
View File

@@ -0,0 +1,20 @@
bzip2:
type: library
artifact:
source:
type: url
url: 'https://dl.static-php.dev/static-php-cli/deps/bzip2/bzip2-1.0.8.tar.gz'
source-mirror:
type: filelist
url: 'https://sourceware.org/pub/bzip2/'
regex: '/href="(?<file>bzip2-(?<version>[^"]+)\.tar\.gz)"/'
metadata:
license-files: ['@/bzip2.txt']
license: bzip2-1.0.6
headers:
- bzlib.h
static-libs@unix:
- libbz2.a
static-libs@windows:
- libbz2.lib
- libbz2_a.lib

14
config/pkg/lib/fastlz.yml Normal file
View File

@@ -0,0 +1,14 @@
fastlz:
type: library
artifact:
source:
type: git
url: 'https://github.com/ariya/FastLZ.git'
rev: master
metadata:
license-files: [LICENSE.MIT]
license: MIT
headers:
- fastlz.h
static-libs@unix:
- libfastlz.a

View File

@@ -0,0 +1,23 @@
freetype:
type: library
artifact:
source:
type: ghtagtar
repo: freetype/freetype
match: VER-2-\d+-\d+
metadata:
license-files: [LICENSE.TXT]
license: FTL
depends:
- zlib
suggests:
- libpng
- bzip2
- brotli
headers@unix:
- freetype2/freetype/freetype.h
- freetype2/ft2build.h
static-libs@unix:
- libfreetype.a
static-libs@windows:
- libfreetype_a.lib

View File

@@ -0,0 +1,9 @@
gettext-win:
type: library
artifact:
source:
type: git
url: 'https://github.com/winlibs/gettext.git'
rev: '0.18'
static-libs@windows:
- libintl_a.lib

View File

@@ -0,0 +1,19 @@
gettext:
type: library
artifact:
source:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/gettext/'
regex: '/href="(?<file>gettext-(?<version>[^"]+)\.tar\.xz)"/'
metadata:
license-files: [gettext-runtime/intl/COPYING.LIB]
license: LGPL-2.1-or-later
depends:
- libiconv
suggests:
- ncurses
- libxml2
frameworks:
- CoreFoundation
static-libs@unix:
- libintl.a

17
config/pkg/lib/glfw.yml Normal file
View File

@@ -0,0 +1,17 @@
glfw:
type: library
artifact: glfw
frameworks:
- Cocoa
- CoreFoundation
- CoreVideo
- IOKit
- QuartzCore
headers:
- GLFW/glfw3.h
- GLFW/glfw3native.h
lang: cpp
static-libs@unix:
- libglfw3.a
static-libs@windows:
- glfw3.lib

19
config/pkg/lib/gmp.yml Normal file
View File

@@ -0,0 +1,19 @@
gmp:
type: library
artifact:
source:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/gmp/'
regex: '/href="(?<file>gmp-(?<version>[^"]+)\.tar\.xz)"/'
source-mirror:
type: url
url: 'https://dl.static-php.dev/static-php-cli/deps/gmp/gmp-6.3.0.tar.xz'
metadata:
license-files: ['@/gmp.txt']
license: Custom
headers:
- gmp.h
pkg-configs:
- gmp
static-libs@unix:
- libgmp.a

15
config/pkg/lib/gmssl.yml Normal file
View File

@@ -0,0 +1,15 @@
gmssl:
type: library
artifact:
source:
type: ghtar
repo: guanzhi/GmSSL
metadata:
license-files: [LICENSE]
license: Apache-2.0
frameworks:
- Security
static-libs@unix:
- libgmssl.a
static-libs@windows:
- gmssl.lib

19
config/pkg/lib/grpc.yml Normal file
View File

@@ -0,0 +1,19 @@
grpc:
type: library
artifact:
source:
type: git
rev: v1.75.x
url: 'https://github.com/grpc/grpc.git'
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- zlib
- openssl
- libcares
frameworks:
- CoreFoundation
lang: cpp
pkg-configs:
- grpc

25
config/pkg/lib/icu.yml Normal file
View File

@@ -0,0 +1,25 @@
icu:
type: library
artifact:
source:
type: ghrel
repo: unicode-org/icu
match: icu4c.+-src\.tgz
prefer-stable: true
binary:
windows-x86_64: { type: url, url: 'https://dl.static-php.dev/static-php-cli/deps/icu-static-windows-x64/icu-static-windows-x64.zip', extract: hosted }
metadata:
license-files: ['@/icu.txt']
license: ICU
headers@windows:
- unicode
lang: cpp
pkg-configs:
- icu-uc
- icu-i18n
- icu-io
static-libs@windows:
- icudt.lib
- icuin.lib
- icuio.lib
- icuuc.lib

21
config/pkg/lib/idn2.yml Normal file
View File

@@ -0,0 +1,21 @@
idn2:
type: library
artifact:
source:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/libidn/'
regex: '/href="(?<file>libidn2-(?<version>[^"]+)\.tar\.gz)"/'
metadata:
license-files: [COPYING.LESSERv3]
license: LGPL-3.0-or-later
depends@macos:
- libiconv
- gettext
suggests@unix:
- libiconv
- gettext
- libunistring
headers:
- idn2.h
pkg-configs:
- libidn2

View File

@@ -0,0 +1,28 @@
imagemagick:
type: library
artifact:
source:
type: ghtar
repo: ImageMagick/ImageMagick
metadata:
license-files: [LICENSE]
depends:
- zlib
- libjpeg
- libjxl
- libpng
- libwebp
- freetype
- libtiff
- libheif
- bzip2
suggests:
- zstd
- xz
- libzip
- libxml2
lang: cpp
pkg-configs:
- Magick++-7.Q16HDRI
- MagickCore-7.Q16HDRI
- MagickWand-7.Q16HDRI

13
config/pkg/lib/imap.yml Normal file
View File

@@ -0,0 +1,13 @@
imap:
type: library
artifact:
source:
type: git
url: 'https://github.com/static-php/imap.git'
rev: master
metadata:
license-files: [LICENSE]
suggests@unix:
- openssl
static-libs@unix:
- libc-client.a

Some files were not shown because too many files have changed in this diff Show More