From 54ceca8680e8243a8bd2c86bdc1a4c9f559e0ad6 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 11:17:12 +0100 Subject: [PATCH 01/16] add extra libs for curl (psl, krb5, unistring, idn2) --- composer.lock | 176 +++++++++--------- config/lib.json | 84 +++++++-- config/source.json | 40 ++++ src/SPC/builder/linux/library/idn2.php | 12 ++ src/SPC/builder/linux/library/krb5.php | 12 ++ .../builder/linux/library/libunistring.php | 12 ++ src/SPC/builder/linux/library/psl.php | 12 ++ src/SPC/builder/unix/library/curl.php | 2 + src/SPC/builder/unix/library/idn2.php | 27 +++ src/SPC/builder/unix/library/krb5.php | 30 +++ src/SPC/builder/unix/library/libunistring.php | 18 ++ src/SPC/builder/unix/library/psl.php | 20 ++ 12 files changed, 342 insertions(+), 103 deletions(-) create mode 100644 src/SPC/builder/linux/library/idn2.php create mode 100644 src/SPC/builder/linux/library/krb5.php create mode 100644 src/SPC/builder/linux/library/libunistring.php create mode 100644 src/SPC/builder/linux/library/psl.php create mode 100644 src/SPC/builder/unix/library/idn2.php create mode 100644 src/SPC/builder/unix/library/krb5.php create mode 100644 src/SPC/builder/unix/library/libunistring.php create mode 100644 src/SPC/builder/unix/library/psl.php diff --git a/composer.lock b/composer.lock index 4b28fc61..e8f320c7 100644 --- a/composer.lock +++ b/composer.lock @@ -416,16 +416,16 @@ }, { "name": "symfony/console", - "version": "v7.3.4", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db" + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", - "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "url": "https://api.github.com/repos/symfony/console/zipball/c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", + "reference": "c28ad91448f86c5f6d9d2c70f0cf68bf135f252a", "shasum": "" }, "require": { @@ -490,7 +490,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.4" + "source": "https://github.com/symfony/console/tree/v7.3.6" }, "funding": [ { @@ -510,7 +510,7 @@ "type": "tidelift" } ], - "time": "2025-09-22T15:31:00+00:00" + "time": "2025-11-04T01:21:42+00:00" }, { "name": "symfony/deprecation-contracts", @@ -981,16 +981,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -1044,7 +1044,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -1055,12 +1055,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/string", @@ -1154,16 +1158,16 @@ }, { "name": "symfony/yaml", - "version": "v7.3.3", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d" + "reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d4f4a66866fe2451f61296924767280ab5732d9d", - "reference": "d4f4a66866fe2451f61296924767280ab5732d9d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/90208e2fc6f68f613eae7ca25a2458a931b1bacc", + "reference": "90208e2fc6f68f613eae7ca25a2458a931b1bacc", "shasum": "" }, "require": { @@ -1206,7 +1210,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.3.3" + "source": "https://github.com/symfony/yaml/tree/v7.3.5" }, "funding": [ { @@ -1226,20 +1230,20 @@ "type": "tidelift" } ], - "time": "2025-08-27T11:34:33+00:00" + "time": "2025-09-27T09:00:46+00:00" }, { "name": "zhamao/logger", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/zhamao-robot/zhamao-logger.git", - "reference": "2551b3e1dbbb1db81794d5c3a666c66804a9dca9" + "reference": "b28c0c26d59d58f153c764f224c21c5901213e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zhamao-robot/zhamao-logger/zipball/2551b3e1dbbb1db81794d5c3a666c66804a9dca9", - "reference": "2551b3e1dbbb1db81794d5c3a666c66804a9dca9", + "url": "https://api.github.com/repos/zhamao-robot/zhamao-logger/zipball/b28c0c26d59d58f153c764f224c21c5901213e25", + "reference": "b28c0c26d59d58f153c764f224c21c5901213e25", "shasum": "" }, "require": { @@ -1293,9 +1297,9 @@ "description": "Another Console Logger for CLI Applications", "support": { "issues": "https://github.com/zhamao-robot/zhamao-logger/issues", - "source": "https://github.com/zhamao-robot/zhamao-logger/tree/1.1.3" + "source": "https://github.com/zhamao-robot/zhamao-logger/tree/1.1.4" }, - "time": "2025-08-02T13:44:27+00:00" + "time": "2025-11-08T15:38:01+00:00" } ], "packages-dev": [ @@ -2860,16 +2864,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.89.0", + "version": "v3.89.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4dd6768cb7558440d27d18f54909eee417317ce9" + "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4dd6768cb7558440d27d18f54909eee417317ce9", - "reference": "4dd6768cb7558440d27d18f54909eee417317ce9", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7569658f91e475ec93b99bd5964b059ad1336dcf", + "reference": "7569658f91e475ec93b99bd5964b059ad1336dcf", "shasum": "" }, "require": { @@ -2905,7 +2909,7 @@ "justinrainbow/json-schema": "^6.5", "keradus/cli-executor": "^2.2", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.8", + "php-coveralls/php-coveralls": "^2.9", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", @@ -2951,7 +2955,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.89.2" }, "funding": [ { @@ -2959,20 +2963,20 @@ "type": "github" } ], - "time": "2025-10-18T19:30:16+00:00" + "time": "2025-11-06T21:12:50+00:00" }, { "name": "humbug/box", - "version": "4.6.8", + "version": "4.6.10", "source": { "type": "git", "url": "https://github.com/box-project/box.git", - "reference": "05d205d99ddb72f3729658a0115db02cfc08912e" + "reference": "6dc6a1314d63e9d75c8195c996e1081e68514c36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/box-project/box/zipball/05d205d99ddb72f3729658a0115db02cfc08912e", - "reference": "05d205d99ddb72f3729658a0115db02cfc08912e", + "url": "https://api.github.com/repos/box-project/box/zipball/6dc6a1314d63e9d75c8195c996e1081e68514c36", + "reference": "6dc6a1314d63e9d75c8195c996e1081e68514c36", "shasum": "" }, "require": { @@ -3001,7 +3005,7 @@ "symfony/process": "^6.4.0 || ^7.0.0", "symfony/var-dumper": "^6.4.0 || ^7.0.0", "thecodingmachine/safe": "^2.5 || ^3.0", - "webmozart/assert": "^1.11" + "webmozart/assert": "^1.12" }, "conflict": { "marc-mabe/php-enum": "<4.4" @@ -3071,9 +3075,9 @@ ], "support": { "issues": "https://github.com/box-project/box/issues", - "source": "https://github.com/box-project/box/tree/4.6.8" + "source": "https://github.com/box-project/box/tree/4.6.10" }, - "time": "2025-10-13T17:13:17+00:00" + "time": "2025-10-31T18:38:02+00:00" }, { "name": "humbug/php-scoper", @@ -3208,16 +3212,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "6.6.0", + "version": "6.6.1", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "68ba7677532803cc0c5900dd5a4d730537f2b2f3" + "reference": "fd8e5c6b1badb998844ad34ce0abcd71a0aeb396" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/68ba7677532803cc0c5900dd5a4d730537f2b2f3", - "reference": "68ba7677532803cc0c5900dd5a4d730537f2b2f3", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fd8e5c6b1badb998844ad34ce0abcd71a0aeb396", + "reference": "fd8e5c6b1badb998844ad34ce0abcd71a0aeb396", "shasum": "" }, "require": { @@ -3277,9 +3281,9 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.0" + "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.1" }, - "time": "2025-10-10T11:34:09+00:00" + "time": "2025-11-07T18:30:29+00:00" }, { "name": "kelunik/certificate", @@ -3700,16 +3704,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" + "reference": "3a454ca033b9e06b63282ce19562e892747449bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", + "reference": "3a454ca033b9e06b63282ce19562e892747449bb", "shasum": "" }, "require": { @@ -3752,9 +3756,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" }, - "time": "2025-08-13T20:13:15+00:00" + "time": "2025-10-21T19:32:17+00:00" }, { "name": "phar-io/composer-distributor", @@ -6776,16 +6780,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v7.3.6", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e9bcfd7837928ab656276fe00464092cc9e1826a", + "reference": "e9bcfd7837928ab656276fe00464092cc9e1826a", "shasum": "" }, "require": { @@ -6822,7 +6826,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v7.3.6" }, "funding": [ { @@ -6842,20 +6846,20 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2025-11-05T09:52:27+00:00" }, { "name": "symfony/finder", - "version": "v7.3.2", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "reference": "9f696d2f1e340484b4683f7853b273abff94421f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/finder/zipball/9f696d2f1e340484b4683f7853b273abff94421f", + "reference": "9f696d2f1e340484b4683f7853b273abff94421f", "shasum": "" }, "require": { @@ -6890,7 +6894,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/finder/tree/v7.3.5" }, "funding": [ { @@ -6910,7 +6914,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-10-15T18:45:57+00:00" }, { "name": "symfony/options-resolver", @@ -7211,16 +7215,16 @@ }, { "name": "symfony/var-dumper", - "version": "v7.3.4", + "version": "v7.3.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb" + "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", - "reference": "b8abe7daf2730d07dfd4b2ee1cecbf0dd2fbdabb", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/476c4ae17f43a9a36650c69879dcf5b1e6ae724d", + "reference": "476c4ae17f43a9a36650c69879dcf5b1e6ae724d", "shasum": "" }, "require": { @@ -7274,7 +7278,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v7.3.5" }, "funding": [ { @@ -7294,7 +7298,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:12:26+00:00" + "time": "2025-09-27T09:00:46+00:00" }, { "name": "thecodingmachine/safe", @@ -7437,16 +7441,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "reference": "d74205c497bfbca49f34d4bc4c19c17e22db4ebb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/d74205c497bfbca49f34d4bc4c19c17e22db4ebb", + "reference": "d74205c497bfbca49f34d4bc4c19c17e22db4ebb", "shasum": "" }, "require": { @@ -7475,7 +7479,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/theseer/tokenizer/tree/1.3.0" }, "funding": [ { @@ -7483,32 +7487,32 @@ "type": "github" } ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2025-11-13T13:44:09+00:00" }, { "name": "webmozart/assert", - "version": "1.11.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", "php": "^7.2 || ^8.0" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { @@ -7539,9 +7543,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2025-10-29T15:56:20+00:00" } ], "aliases": [], diff --git a/config/lib.json b/config/lib.json index d74658a6..ac0b8895 100644 --- a/config/lib.json +++ b/config/lib.json @@ -91,7 +91,7 @@ "libssh2", "nghttp2" ], - "lib-suggests-unix": [ + "lib-suggests-linux": [ "libssh2", "brotli", "nghttp2", @@ -99,7 +99,22 @@ "ngtcp2", "zstd", "libcares", - "ldap" + "ldap", + "krb5", + "idn2", + "psl" + ], + "lib-suggests-macos": [ + "libssh2", + "brotli", + "nghttp2", + "nghttp3", + "ngtcp2", + "zstd", + "libcares", + "ldap", + "idn2", + "psl" ], "lib-suggests-windows": [ "brotli", @@ -936,6 +951,56 @@ "libiconv" ] }, + "krb5": { + "source": "krb5", + "pkg-configs": [ + "krb5-gssapi" + ], + "headers": [ + "krb5.h", + "gssapi/gssapi.h" + ] + }, + "libunistring": { + "source": "libunistring", + "static-libs-unix": [ + "libunistring.a" + ], + "headers": [ + "unistring.h", + "unistring/" + ] + }, + "idn2": { + "source": "libidn2", + "pkg-configs": [ + "libidn2" + ], + "headers": [ + "idn2.h" + ], + "lib-suggests-linux": [ + "libiconv", + "libunistring", + "gettext" + ], + "lib-depends-macos": [ + "libiconv", + "gettext" + ] + }, + "psl": { + "source": "libpsl", + "pkg-configs": [ + "libpsl" + ], + "headers": [ + "libpsl.h" + ], + "lib-depends": [ + "idn2" + ] + }, "zlib": { "source": "zlib", "static-libs-unix": [ @@ -970,21 +1035,6 @@ "zstd_errors.h" ] }, - "liburing": { - "source": "liburing", - "pkg-configs": [ - "liburing", - "liburing-ffi" - ], - "static-libs-linux": [ - "liburing.a", - "liburing-ffi.a" - ], - "headers-linux": [ - "liburing/", - "liburing.h" - ] - }, "frankenphp": { "source": "frankenphp", "type": "target" diff --git a/config/source.json b/config/source.json index ca1edfb0..ac699c0e 100644 --- a/config/source.json +++ b/config/source.json @@ -1171,6 +1171,46 @@ "path": "LICENSE" } }, + "krb5": { + "type": "ghtagtar", + "repo": "krb5/krb5", + "match": "krb5.+-final", + "prefer-stable": true, + "license": { + "type": "file", + "path": "NOTICE" + } + }, + "libunistring": { + "type": "filelist", + "url": "https://ftp.gnu.org/gnu/libunistring/", + "regex": "/href=\"(?libunistring-(?[^\"]+)\\.tar\\.gz)\"/", + "prefer-stable": true, + "license": { + "type": "file", + "path": "COPYING.LIB" + } + }, + "libidn2": { + "type": "filelist", + "url": "https://ftp.gnu.org/gnu/libidn/", + "regex": "/href=\"(?libidn2-(?[^\"]+)\\.tar\\.gz)\"/", + "prefer-stable": true, + "license": { + "type": "file", + "path": "COPYING" + } + }, + "libpsl": { + "type": "ghrel", + "repo": "rockdaboot/libpsl", + "match": "libpsl.+\\.tar\\.gz", + "prefer-stable": true, + "license": { + "type": "file", + "path": "COPYING" + } + }, "zlib": { "type": "ghrel", "repo": "madler/zlib", diff --git a/src/SPC/builder/linux/library/idn2.php b/src/SPC/builder/linux/library/idn2.php new file mode 100644 index 00000000..a271760d --- /dev/null +++ b/src/SPC/builder/linux/library/idn2.php @@ -0,0 +1,12 @@ +optionalLib('zstd', ...cmake_boolean_args('CURL_ZSTD')) ->optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2')) ->optionalLib('psl', ...cmake_boolean_args('CURL_USE_LIBPSL')) + ->optionalLib('krb5', ...cmake_boolean_args('CURL_USE_GSSAPI')) + ->optionalLib('idn2', ...cmake_boolean_args('CURL_USE_IDN2')) ->optionalLib('libcares', '-DENABLE_ARES=ON') ->addConfigureArgs( '-DBUILD_CURL_EXE=OFF', diff --git a/src/SPC/builder/unix/library/idn2.php b/src/SPC/builder/unix/library/idn2.php new file mode 100644 index 00000000..82956534 --- /dev/null +++ b/src/SPC/builder/unix/library/idn2.php @@ -0,0 +1,27 @@ +configure( + '--disable-nls', + '--disable-doc', + '--enable-year2038', + '--disable-rpath' + ) + ->optionalLib('libiconv', "--with-libiconv-prefix={$this->getBuildRootPath()}") + ->optionalLib('libunistring', "--with-libunistring-prefix={$this->getBuildRootPath()}") + ->optionalLib('gettext', "--with-libnintl-prefix={$this->getBuildRootPath()}") + ->make(); + $this->patchPkgconfPrefix(['libidn2.pc']); + $this->patchLaDependencyPrefix(); + } +} diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php new file mode 100644 index 00000000..8e5cdfe2 --- /dev/null +++ b/src/SPC/builder/unix/library/krb5.php @@ -0,0 +1,30 @@ +source_dir .= '/src'; + shell()->cd($this->source_dir)->exec('autoreconf -if'); + UnixAutoconfExecutor::create($this) + ->appendEnv(['LDFLAGS' => '-Wl,--allow-multiple-definition']) + ->configure() + ->make(); + $this->patchPkgconfPrefix([ + 'krb5-gssapi.pc', + 'krb5.pc', + 'kadm-server.pc', + 'kadm-client.pc', + 'kdb.pc', + 'mit-krb5-gssapi.pc', + 'mit-krb5.pc', + 'gssrpc.pc', + ]); + } +} diff --git a/src/SPC/builder/unix/library/libunistring.php b/src/SPC/builder/unix/library/libunistring.php new file mode 100644 index 00000000..1d410a8c --- /dev/null +++ b/src/SPC/builder/unix/library/libunistring.php @@ -0,0 +1,18 @@ +configure('--disable-nls') + ->make(); + $this->patchLaDependencyPrefix(); + } +} diff --git a/src/SPC/builder/unix/library/psl.php b/src/SPC/builder/unix/library/psl.php new file mode 100644 index 00000000..11c1777c --- /dev/null +++ b/src/SPC/builder/unix/library/psl.php @@ -0,0 +1,20 @@ +optionalLib('idn2', ...ac_with_args('libidn2', true)) + ->configure('--disable-nls') + ->make(); + $this->patchPkgconfPrefix(['libpsl.pc']); + $this->patchLaDependencyPrefix(); + } +} From a33ca44ca9fb95f9d009fa672b7a988286f8f4e8 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 11:28:25 +0100 Subject: [PATCH 02/16] test curl --- config/lib.json | 104 +++++++++++++++----------------- config/source.json | 89 ++++++++++++--------------- src/globals/test-extensions.php | 8 +-- 3 files changed, 92 insertions(+), 109 deletions(-) diff --git a/config/lib.json b/config/lib.json index 11272f26..b0520fc5 100644 --- a/config/lib.json +++ b/config/lib.json @@ -249,6 +249,24 @@ "unicode" ] }, + "idn2": { + "source": "libidn2", + "pkg-configs": [ + "libidn2" + ], + "headers": [ + "idn2.h" + ], + "lib-suggests-unix": [ + "libiconv", + "libunistring", + "gettext" + ], + "lib-depends-macos": [ + "libiconv", + "gettext" + ] + }, "imagemagick": { "source": "imagemagick", "cpp-library": true, @@ -296,6 +314,16 @@ "jbig_ar.h" ] }, + "krb5": { + "source": "krb5", + "pkg-configs": [ + "krb5-gssapi" + ], + "headers": [ + "krb5.h", + "gssapi/gssapi.h" + ] + }, "ldap": { "source": "ldap", "pkg-configs": [ @@ -583,6 +611,16 @@ "zstd" ] }, + "libunistring": { + "source": "libunistring", + "static-libs-unix": [ + "libunistring.a" + ], + "headers": [ + "unistring.h", + "unistring/" + ] + }, "liburing": { "source": "liburing", "pkg-configs": [ @@ -847,6 +885,18 @@ "libpgcommon.lib" ] }, + "psl": { + "source": "libpsl", + "pkg-configs": [ + "libpsl" + ], + "headers": [ + "libpsl.h" + ], + "lib-depends": [ + "idn2" + ] + }, "pthreads4w": { "source": "pthreads4w", "static-libs-windows": [ @@ -956,56 +1006,6 @@ "libiconv" ] }, - "krb5": { - "source": "krb5", - "pkg-configs": [ - "krb5-gssapi" - ], - "headers": [ - "krb5.h", - "gssapi/gssapi.h" - ] - }, - "libunistring": { - "source": "libunistring", - "static-libs-unix": [ - "libunistring.a" - ], - "headers": [ - "unistring.h", - "unistring/" - ] - }, - "idn2": { - "source": "libidn2", - "pkg-configs": [ - "libidn2" - ], - "headers": [ - "idn2.h" - ], - "lib-suggests-linux": [ - "libiconv", - "libunistring", - "gettext" - ], - "lib-depends-macos": [ - "libiconv", - "gettext" - ] - }, - "psl": { - "source": "libpsl", - "pkg-configs": [ - "libpsl" - ], - "headers": [ - "libpsl.h" - ], - "lib-depends": [ - "idn2" - ] - }, "zlib": { "source": "zlib", "static-libs-unix": [ @@ -1039,9 +1039,5 @@ "zstd.h", "zstd_errors.h" ] - }, - "frankenphp": { - "source": "frankenphp", - "type": "target" } } diff --git a/config/source.json b/config/source.json index d10ecc5e..ba3b15d3 100644 --- a/config/source.json +++ b/config/source.json @@ -305,7 +305,6 @@ "type": "ghtar", "repo": "php/frankenphp", "prefer-stable": true, - "provide-pre-built": false, "license": { "type": "file", "path": "LICENSE" @@ -373,16 +372,6 @@ "path": "LICENSE" } }, - "frankenphp": { - "type": "ghtar", - "repo": "php/frankenphp", - "prefer-stable": true, - "provide-pre-build": false, - "license": { - "type": "file", - "path": "LICENSE" - } - }, "icu-static-win": { "type": "url", "url": "https://dl.static-php.dev/static-php-cli/deps/icu-static-windows-x64/icu-static-windows-x64.zip", @@ -441,6 +430,16 @@ "path": "COPYING" } }, + "krb5": { + "type": "ghtagtar", + "repo": "krb5/krb5", + "match": "krb5.+-final", + "prefer-stable": true, + "license": { + "type": "file", + "path": "NOTICE" + } + }, "ldap": { "type": "filelist", "url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/", @@ -599,6 +598,15 @@ "path": "source/COPYING" } }, + "libidn2": { + "type": "filelist", + "url": "https://ftp.gnu.org/gnu/libidn/", + "regex": "/href=\"(?libidn2-(?[^\"]+)\\.tar\\.gz)\"/", + "license": { + "type": "file", + "path": "COPYING" + } + }, "libjpeg": { "type": "ghtar", "repo": "libjpeg-turbo/libjpeg-turbo", @@ -652,6 +660,16 @@ "path": "LICENSE" } }, + "libpsl": { + "type": "ghrel", + "repo": "rockdaboot/libpsl", + "match": "libpsl.+\\.tar\\.gz", + "prefer-stable": true, + "license": { + "type": "file", + "path": "COPYING" + } + }, "librabbitmq": { "type": "git", "url": "https://github.com/alanxz/rabbitmq-c.git", @@ -700,6 +718,15 @@ "path": "LICENSE.md" } }, + "libunistring": { + "type": "filelist", + "url": "https://ftp.gnu.org/gnu/libunistring/", + "regex": "/href=\"(?libunistring-(?[^\"]+)\\.tar\\.gz)\"/", + "license": { + "type": "file", + "path": "COPYING.LIB" + } + }, "liburing": { "type": "ghtar", "repo": "axboe/liburing", @@ -1181,46 +1208,6 @@ "path": "LICENSE" } }, - "krb5": { - "type": "ghtagtar", - "repo": "krb5/krb5", - "match": "krb5.+-final", - "prefer-stable": true, - "license": { - "type": "file", - "path": "NOTICE" - } - }, - "libunistring": { - "type": "filelist", - "url": "https://ftp.gnu.org/gnu/libunistring/", - "regex": "/href=\"(?libunistring-(?[^\"]+)\\.tar\\.gz)\"/", - "prefer-stable": true, - "license": { - "type": "file", - "path": "COPYING.LIB" - } - }, - "libidn2": { - "type": "filelist", - "url": "https://ftp.gnu.org/gnu/libidn/", - "regex": "/href=\"(?libidn2-(?[^\"]+)\\.tar\\.gz)\"/", - "prefer-stable": true, - "license": { - "type": "file", - "path": "COPYING" - } - }, - "libpsl": { - "type": "ghrel", - "repo": "rockdaboot/libpsl", - "match": "libpsl.+\\.tar\\.gz", - "prefer-stable": true, - "license": { - "type": "file", - "path": "COPYING" - } - }, "zlib": { "type": "ghrel", "repo": "madler/zlib", diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 62d7d411..dddcc0f2 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -31,7 +31,7 @@ $test_os = [ 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 'ubuntu-24.04-arm', // bin/spc for arm64 // 'windows-2022', // .\bin\spc.ps1 - 'windows-2025', + // 'windows-2025', ]; // whether enable thread safe @@ -50,14 +50,14 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'rdkafka', + 'Linux', 'Darwin' => 'curl', 'Windows' => 'bcmath', }; // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). $shared_extensions = match (PHP_OS_FAMILY) { - 'Linux' => 'snmp', - 'Darwin' => 'snmp', + 'Linux' => '', + 'Darwin' => '', 'Windows' => '', }; From 81dce024311e75cf89edc78b7883c783d97f7f6f Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 14:06:15 +0100 Subject: [PATCH 03/16] use lgpl --- config/source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/source.json b/config/source.json index ba3b15d3..b300e284 100644 --- a/config/source.json +++ b/config/source.json @@ -604,7 +604,7 @@ "regex": "/href=\"(?libidn2-(?[^\"]+)\\.tar\\.gz)\"/", "license": { "type": "file", - "path": "COPYING" + "path": "COPYING.LESSERv3" } }, "libjpeg": { From ecea6c12cd30ffaee76e79805e004d33641615b0 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 14:35:58 +0100 Subject: [PATCH 04/16] libs for macos too --- config/lib.json | 7 +++++++ src/SPC/builder/macos/library/idn2.php | 12 ++++++++++++ src/SPC/builder/macos/library/libunistring.php | 12 ++++++++++++ src/SPC/builder/macos/library/psl.php | 12 ++++++++++++ src/SPC/builder/unix/library/krb5.php | 11 +++++++++-- 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 src/SPC/builder/macos/library/idn2.php create mode 100644 src/SPC/builder/macos/library/libunistring.php create mode 100644 src/SPC/builder/macos/library/psl.php diff --git a/config/lib.json b/config/lib.json index b0520fc5..394649f3 100644 --- a/config/lib.json +++ b/config/lib.json @@ -322,6 +322,13 @@ "headers": [ "krb5.h", "gssapi/gssapi.h" + ], + "lib-depends": [ + "openssl" + ], + "lib-suggests": [ + "ldap", + "libedit" ] }, "ldap": { diff --git a/src/SPC/builder/macos/library/idn2.php b/src/SPC/builder/macos/library/idn2.php new file mode 100644 index 00000000..a41eeeb1 --- /dev/null +++ b/src/SPC/builder/macos/library/idn2.php @@ -0,0 +1,12 @@ +source_dir .= '/src'; shell()->cd($this->source_dir)->exec('autoreconf -if'); UnixAutoconfExecutor::create($this) - ->appendEnv(['LDFLAGS' => '-Wl,--allow-multiple-definition']) - ->configure() + ->appendEnv([ + 'LDFLAGS' => '-Wl,--allow-multiple-definition', + ]) + ->optionalLib('ldap', '--with-ldap', '--without-ldap') + ->optionalLib('libedit', '--with-readline', '--without-readline') + ->configure( + '--disable-nls', + '--disable-rpath', + ) ->make(); $this->patchPkgconfPrefix([ 'krb5-gssapi.pc', From 1fed8f28022a85ad0631e6270574b2a6e26d80f9 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 17:22:27 +0100 Subject: [PATCH 05/16] add required libs to krb5 --- config/source.json | 2 ++ src/SPC/builder/unix/library/krb5.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/config/source.json b/config/source.json index b300e284..d4793c35 100644 --- a/config/source.json +++ b/config/source.json @@ -722,6 +722,7 @@ "type": "filelist", "url": "https://ftp.gnu.org/gnu/libunistring/", "regex": "/href=\"(?libunistring-(?[^\"]+)\\.tar\\.gz)\"/", + "provide-pre-built": true, "license": { "type": "file", "path": "COPYING.LIB" @@ -740,6 +741,7 @@ "type": "git", "url": "https://github.com/static-php/libuuid.git", "rev": "master", + "provide-pre-built": true, "license": { "type": "file", "path": "COPYING" diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 97c3d233..03c071f5 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SPC\builder\unix\library; use SPC\util\executor\UnixAutoconfExecutor; +use SPC\util\SPCConfigUtil; trait krb5 { @@ -12,8 +13,12 @@ trait krb5 { $this->source_dir .= '/src'; shell()->cd($this->source_dir)->exec('autoreconf -if'); + $libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true)); + $spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]); + $config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false)); UnixAutoconfExecutor::create($this) ->appendEnv([ + 'LIBS' => $config['libs'], 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap') From a1b8d201aee74cfeb57d7b78fc7440e1c9a89a48 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 17:47:26 +0100 Subject: [PATCH 06/16] add gsasl --- config/lib.json | 18 +++++++++++++++++- config/source.json | 10 ++++++++++ src/SPC/builder/linux/library/gsasl.php | 12 ++++++++++++ src/SPC/builder/unix/library/curl.php | 1 + src/SPC/builder/unix/library/gsasl.php | 25 +++++++++++++++++++++++++ src/SPC/builder/unix/library/krb5.php | 2 +- 6 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 src/SPC/builder/linux/library/gsasl.php create mode 100644 src/SPC/builder/unix/library/gsasl.php diff --git a/config/lib.json b/config/lib.json index 394649f3..558357c8 100644 --- a/config/lib.json +++ b/config/lib.json @@ -107,7 +107,8 @@ "ldap", "krb5", "idn2", - "psl" + "psl", + "gsasl" ], "lib-suggests-macos": [ "libssh2", @@ -904,6 +905,21 @@ "idn2" ] }, + "gsasl": { + "source": "gsasl", + "pkg-configs": [ + "libgsasl" + ], + "headers": [ + "gsasl.h" + ], + "lib-depends": [ + "idn2" + ], + "lib-suggests": [ + "krb5" + ] + }, "pthreads4w": { "source": "pthreads4w", "static-libs-windows": [ diff --git a/config/source.json b/config/source.json index d4793c35..de249ad1 100644 --- a/config/source.json +++ b/config/source.json @@ -1200,6 +1200,16 @@ "path": "LICENSE" } }, + "gsasl": { + "type": "filelist", + "url": "https://ftp.gnu.org/gnu/gsasl/", + "regex": "/href=\\\"(?gsasl-(?[^\\\"]+)\\.tar\\.gz)\\\"/", + "prefer-stable": true, + "license": { + "type": "file", + "path": "COPYING.LESSER" + } + }, "yaml": { "type": "git", "path": "php-src/ext/yaml", diff --git a/src/SPC/builder/linux/library/gsasl.php b/src/SPC/builder/linux/library/gsasl.php new file mode 100644 index 00000000..34a8ca64 --- /dev/null +++ b/src/SPC/builder/linux/library/gsasl.php @@ -0,0 +1,12 @@ +optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2')) ->optionalLib('psl', ...cmake_boolean_args('CURL_USE_LIBPSL')) ->optionalLib('krb5', ...cmake_boolean_args('CURL_USE_GSSAPI')) + ->optionalLib('gsasl', ...cmake_boolean_args('USE_GSASL')) ->optionalLib('idn2', ...cmake_boolean_args('CURL_USE_IDN2')) ->optionalLib('libcares', '-DENABLE_ARES=ON') ->addConfigureArgs( diff --git a/src/SPC/builder/unix/library/gsasl.php b/src/SPC/builder/unix/library/gsasl.php new file mode 100644 index 00000000..74b9950d --- /dev/null +++ b/src/SPC/builder/unix/library/gsasl.php @@ -0,0 +1,25 @@ +optionalLib('idn2', ...ac_with_args('libidn2', true)) + ->optionalLib('krb5', ...ac_with_args('gssapi', true)) + ->configure( + '--disable-nls', + '--disable-rpath', + '--disable-doc', + ) + ->make(); + $this->patchPkgconfPrefix(['libgsasl.pc']); + $this->patchLaDependencyPrefix(); + } +} diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 03c071f5..1834e494 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -22,7 +22,7 @@ trait krb5 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap') - ->optionalLib('libedit', '--with-readline', '--without-readline') + ->optionalLib('libedit', '--with-libedit', '--without-libedit') ->configure( '--disable-nls', '--disable-rpath', From 9382161b6f243d78cb299803be7870e04ec4e1b2 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 17:49:10 +0100 Subject: [PATCH 07/16] Revert "add gsasl" This reverts commit a1b8d201aee74cfeb57d7b78fc7440e1c9a89a48. --- config/lib.json | 18 +----------------- config/source.json | 10 ---------- src/SPC/builder/linux/library/gsasl.php | 12 ------------ src/SPC/builder/unix/library/curl.php | 1 - src/SPC/builder/unix/library/gsasl.php | 25 ------------------------- src/SPC/builder/unix/library/krb5.php | 2 +- 6 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 src/SPC/builder/linux/library/gsasl.php delete mode 100644 src/SPC/builder/unix/library/gsasl.php diff --git a/config/lib.json b/config/lib.json index 558357c8..394649f3 100644 --- a/config/lib.json +++ b/config/lib.json @@ -107,8 +107,7 @@ "ldap", "krb5", "idn2", - "psl", - "gsasl" + "psl" ], "lib-suggests-macos": [ "libssh2", @@ -905,21 +904,6 @@ "idn2" ] }, - "gsasl": { - "source": "gsasl", - "pkg-configs": [ - "libgsasl" - ], - "headers": [ - "gsasl.h" - ], - "lib-depends": [ - "idn2" - ], - "lib-suggests": [ - "krb5" - ] - }, "pthreads4w": { "source": "pthreads4w", "static-libs-windows": [ diff --git a/config/source.json b/config/source.json index de249ad1..d4793c35 100644 --- a/config/source.json +++ b/config/source.json @@ -1200,16 +1200,6 @@ "path": "LICENSE" } }, - "gsasl": { - "type": "filelist", - "url": "https://ftp.gnu.org/gnu/gsasl/", - "regex": "/href=\\\"(?gsasl-(?[^\\\"]+)\\.tar\\.gz)\\\"/", - "prefer-stable": true, - "license": { - "type": "file", - "path": "COPYING.LESSER" - } - }, "yaml": { "type": "git", "path": "php-src/ext/yaml", diff --git a/src/SPC/builder/linux/library/gsasl.php b/src/SPC/builder/linux/library/gsasl.php deleted file mode 100644 index 34a8ca64..00000000 --- a/src/SPC/builder/linux/library/gsasl.php +++ /dev/null @@ -1,12 +0,0 @@ -optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2')) ->optionalLib('psl', ...cmake_boolean_args('CURL_USE_LIBPSL')) ->optionalLib('krb5', ...cmake_boolean_args('CURL_USE_GSSAPI')) - ->optionalLib('gsasl', ...cmake_boolean_args('USE_GSASL')) ->optionalLib('idn2', ...cmake_boolean_args('CURL_USE_IDN2')) ->optionalLib('libcares', '-DENABLE_ARES=ON') ->addConfigureArgs( diff --git a/src/SPC/builder/unix/library/gsasl.php b/src/SPC/builder/unix/library/gsasl.php deleted file mode 100644 index 74b9950d..00000000 --- a/src/SPC/builder/unix/library/gsasl.php +++ /dev/null @@ -1,25 +0,0 @@ -optionalLib('idn2', ...ac_with_args('libidn2', true)) - ->optionalLib('krb5', ...ac_with_args('gssapi', true)) - ->configure( - '--disable-nls', - '--disable-rpath', - '--disable-doc', - ) - ->make(); - $this->patchPkgconfPrefix(['libgsasl.pc']); - $this->patchLaDependencyPrefix(); - } -} diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 1834e494..03c071f5 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -22,7 +22,7 @@ trait krb5 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap') - ->optionalLib('libedit', '--with-libedit', '--without-libedit') + ->optionalLib('libedit', '--with-readline', '--without-readline') ->configure( '--disable-nls', '--disable-rpath', From 875e1d05cd3f2be99a9593ea1664a9f1ee8e7836 Mon Sep 17 00:00:00 2001 From: Marc Henderkes Date: Tue, 18 Nov 2025 17:50:49 +0100 Subject: [PATCH 08/16] libedit instead of readline --- src/SPC/builder/unix/library/krb5.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 03c071f5..1834e494 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -22,7 +22,7 @@ trait krb5 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap') - ->optionalLib('libedit', '--with-readline', '--without-readline') + ->optionalLib('libedit', '--with-libedit', '--without-libedit') ->configure( '--disable-nls', '--disable-rpath', From 376b8e7569d1fb6074a5cc1804e2022d27e90050 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 10:48:24 +0100 Subject: [PATCH 09/16] remove psl --- config/lib.json | 35 ++++---------------------- config/source.json | 10 -------- src/SPC/builder/linux/library/psl.php | 12 --------- src/SPC/builder/macos/library/krb5.php | 12 +++++++++ src/SPC/builder/macos/library/psl.php | 12 --------- src/SPC/builder/unix/library/krb5.php | 2 +- src/SPC/builder/unix/library/psl.php | 20 --------------- 7 files changed, 18 insertions(+), 85 deletions(-) delete mode 100644 src/SPC/builder/linux/library/psl.php create mode 100644 src/SPC/builder/macos/library/krb5.php delete mode 100644 src/SPC/builder/macos/library/psl.php delete mode 100644 src/SPC/builder/unix/library/psl.php diff --git a/config/lib.json b/config/lib.json index 394649f3..462f4a55 100644 --- a/config/lib.json +++ b/config/lib.json @@ -96,20 +96,7 @@ "libssh2", "nghttp2" ], - "lib-suggests-linux": [ - "libssh2", - "brotli", - "nghttp2", - "nghttp3", - "ngtcp2", - "zstd", - "libcares", - "ldap", - "krb5", - "idn2", - "psl" - ], - "lib-suggests-macos": [ + "lib-suggests-unix": [ "libssh2", "brotli", "nghttp2", @@ -119,7 +106,7 @@ "libcares", "ldap", "idn2", - "psl" + "krb5" ], "lib-suggests-windows": [ "brotli", @@ -259,8 +246,8 @@ ], "lib-suggests-unix": [ "libiconv", - "libunistring", - "gettext" + "gettext", + "libunistring" ], "lib-depends-macos": [ "libiconv", @@ -624,7 +611,7 @@ "libunistring.a" ], "headers": [ - "unistring.h", + "unistr.h", "unistring/" ] }, @@ -892,18 +879,6 @@ "libpgcommon.lib" ] }, - "psl": { - "source": "libpsl", - "pkg-configs": [ - "libpsl" - ], - "headers": [ - "libpsl.h" - ], - "lib-depends": [ - "idn2" - ] - }, "pthreads4w": { "source": "pthreads4w", "static-libs-windows": [ diff --git a/config/source.json b/config/source.json index d4793c35..76bf1835 100644 --- a/config/source.json +++ b/config/source.json @@ -660,16 +660,6 @@ "path": "LICENSE" } }, - "libpsl": { - "type": "ghrel", - "repo": "rockdaboot/libpsl", - "match": "libpsl.+\\.tar\\.gz", - "prefer-stable": true, - "license": { - "type": "file", - "path": "COPYING" - } - }, "librabbitmq": { "type": "git", "url": "https://github.com/alanxz/rabbitmq-c.git", diff --git a/src/SPC/builder/linux/library/psl.php b/src/SPC/builder/linux/library/psl.php deleted file mode 100644 index 1d42d9ba..00000000 --- a/src/SPC/builder/linux/library/psl.php +++ /dev/null @@ -1,12 +0,0 @@ -config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false)); UnixAutoconfExecutor::create($this) ->appendEnv([ + 'CFLAGS' => '-fcommon', 'LIBS' => $config['libs'], - 'LDFLAGS' => '-Wl,--allow-multiple-definition', ]) ->optionalLib('ldap', '--with-ldap', '--without-ldap') ->optionalLib('libedit', '--with-libedit', '--without-libedit') diff --git a/src/SPC/builder/unix/library/psl.php b/src/SPC/builder/unix/library/psl.php deleted file mode 100644 index 11c1777c..00000000 --- a/src/SPC/builder/unix/library/psl.php +++ /dev/null @@ -1,20 +0,0 @@ -optionalLib('idn2', ...ac_with_args('libidn2', true)) - ->configure('--disable-nls') - ->make(); - $this->patchPkgconfPrefix(['libpsl.pc']); - $this->patchLaDependencyPrefix(); - } -} From 6861e9c2c720b3d246b8095af4583aaaea93a44c Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 11:59:09 +0100 Subject: [PATCH 10/16] append ld_library_path for musl toolchain --- src/SPC/builder/unix/library/krb5.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 0875da0c..00ddd6d9 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -16,16 +16,25 @@ trait krb5 $libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true)); $spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]); $config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false)); - UnixAutoconfExecutor::create($this) + $make = UnixAutoconfExecutor::create($this) ->appendEnv([ 'CFLAGS' => '-fcommon', 'LIBS' => $config['libs'], - ]) + ]); + if (getenv('SPC_LD_LIBRARY_PATH') && getenv('SPC_LIBRARY_PATH')) { + $make->appendEnv([ + 'LD_LIBRARY_PATH' => getenv('SPC_LD_LIBRARY_PATH'), + 'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'), + ]); + } + $make ->optionalLib('ldap', '--with-ldap', '--without-ldap') ->optionalLib('libedit', '--with-libedit', '--without-libedit') ->configure( '--disable-nls', '--disable-rpath', + '--disable-silent-rules', + '--without-system-verto', ) ->make(); $this->patchPkgconfPrefix([ From e8d1970f55fca1bc064e132fb129e3f922c51db4 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 13:54:17 +0100 Subject: [PATCH 11/16] secure_getenv not available on macos --- src/SPC/builder/unix/library/krb5.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 00ddd6d9..0f499530 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -27,15 +27,17 @@ trait krb5 'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'), ]); } + $args = [ + '--disable-nls', + '--disable-rpath', + '--without-system-verto']; + if (PHP_OS_FAMILY === 'Darwin') { + $args[] = 'ac_cv_func_secure_getenv=no'; + } $make ->optionalLib('ldap', '--with-ldap', '--without-ldap') ->optionalLib('libedit', '--with-libedit', '--without-libedit') - ->configure( - '--disable-nls', - '--disable-rpath', - '--disable-silent-rules', - '--without-system-verto', - ) + ->configure(...$args) ->make(); $this->patchPkgconfPrefix([ 'krb5-gssapi.pc', From 2b0a0bdad9f63b436f560c0424e885f908e9d423 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 13:54:45 +0100 Subject: [PATCH 12/16] fix cs --- src/SPC/builder/unix/library/krb5.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 0f499530..f3cf1dc6 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -30,7 +30,8 @@ trait krb5 $args = [ '--disable-nls', '--disable-rpath', - '--without-system-verto']; + '--without-system-verto', + ]; if (PHP_OS_FAMILY === 'Darwin') { $args[] = 'ac_cv_func_secure_getenv=no'; } From 84e9f13688afd163baf8954ce63cc7a46dd18b31 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 14:48:10 +0100 Subject: [PATCH 13/16] framework? --- src/SPC/builder/unix/library/krb5.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index f3cf1dc6..33523d75 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -16,16 +16,15 @@ trait krb5 $libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true)); $spc = new SPCConfigUtil($this->builder, ['no_php' => true, 'libs_only_deps' => true]); $config = $spc->config(libraries: $libs, include_suggest_lib: $this->builder->getOption('with-suggested-libs', false)); - $make = UnixAutoconfExecutor::create($this) - ->appendEnv([ - 'CFLAGS' => '-fcommon', - 'LIBS' => $config['libs'], - ]); + $extraEnv = [ + 'CFLAGS' => '-fcommon', + 'LIBS' => $config['libs'], + ]; if (getenv('SPC_LD_LIBRARY_PATH') && getenv('SPC_LIBRARY_PATH')) { - $make->appendEnv([ + $extraEnv = [...$extraEnv, ...[ 'LD_LIBRARY_PATH' => getenv('SPC_LD_LIBRARY_PATH'), 'LIBRARY_PATH' => getenv('SPC_LIBRARY_PATH'), - ]); + ]]; } $args = [ '--disable-nls', @@ -33,9 +32,11 @@ trait krb5 '--without-system-verto', ]; if (PHP_OS_FAMILY === 'Darwin') { + $extraEnv['LDFLAGS'] = '-framework Kerberos'; $args[] = 'ac_cv_func_secure_getenv=no'; } - $make + UnixAutoconfExecutor::create($this) + ->appendEnv($extraEnv) ->optionalLib('ldap', '--with-ldap', '--without-ldap') ->optionalLib('libedit', '--with-libedit', '--without-libedit') ->configure(...$args) From 1e09017549f22c053babbff97787cc248cd06195 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 14:49:37 +0100 Subject: [PATCH 14/16] frameworks? --- src/SPC/builder/unix/library/krb5.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 33523d75..68e16274 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -32,7 +32,7 @@ trait krb5 '--without-system-verto', ]; if (PHP_OS_FAMILY === 'Darwin') { - $extraEnv['LDFLAGS'] = '-framework Kerberos'; + $extraEnv['LDFLAGS'] = '-framework Kerberos -framework Security -framework CoreFoundation'; $args[] = 'ac_cv_func_secure_getenv=no'; } UnixAutoconfExecutor::create($this) From 1662ac4cf8b5bdbbea2a43e9612a35a1d9bc2e5e Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 19 Nov 2025 15:20:05 +0100 Subject: [PATCH 15/16] framework! --- config/lib.json | 3 +++ src/SPC/builder/unix/library/krb5.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/lib.json b/config/lib.json index 462f4a55..48a674c7 100644 --- a/config/lib.json +++ b/config/lib.json @@ -316,6 +316,9 @@ "lib-suggests": [ "ldap", "libedit" + ], + "frameworks": [ + "Kerberos" ] }, "ldap": { diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 68e16274..33523d75 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -32,7 +32,7 @@ trait krb5 '--without-system-verto', ]; if (PHP_OS_FAMILY === 'Darwin') { - $extraEnv['LDFLAGS'] = '-framework Kerberos -framework Security -framework CoreFoundation'; + $extraEnv['LDFLAGS'] = '-framework Kerberos'; $args[] = 'ac_cv_func_secure_getenv=no'; } UnixAutoconfExecutor::create($this) From f14df1925c2ba9166e0ba64843ad3bac0bb039dc Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Fri, 21 Nov 2025 22:03:41 +0800 Subject: [PATCH 16/16] Store original source directory before modification --- src/SPC/builder/unix/library/krb5.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SPC/builder/unix/library/krb5.php b/src/SPC/builder/unix/library/krb5.php index 33523d75..79834645 100644 --- a/src/SPC/builder/unix/library/krb5.php +++ b/src/SPC/builder/unix/library/krb5.php @@ -11,6 +11,7 @@ trait krb5 { protected function build(): void { + $origin_source_dir = $this->source_dir; $this->source_dir .= '/src'; shell()->cd($this->source_dir)->exec('autoreconf -if'); $libs = array_map(fn ($x) => $x->getName(), $this->getDependencies(true)); @@ -51,5 +52,6 @@ trait krb5 'mit-krb5.pc', 'gssrpc.pc', ]); + $this->source_dir = $origin_source_dir; } }