From 90d7fe46d79b35dc206430b29db5f6b3b51b6613 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 6 May 2026 11:39:08 +0700 Subject: [PATCH] add ext-gearman --- composer.lock | 144 +++++++++---------- config/env.ini | 10 +- config/pkg/ext/ext-gearman.yml | 16 +++ config/pkg/lib/libevent.yml | 1 + config/pkg/lib/libgearman.yml | 23 +++ src/Package/Extension/gearman.php | 20 +++ src/Package/Library/libevent.php | 3 +- src/Package/Library/libgearman.php | 55 +++++++ src/Package/Target/php/unix.php | 2 +- src/StaticPHP/Doctor/Item/LinuxToolCheck.php | 8 +- src/StaticPHP/Doctor/Item/MacOSToolCheck.php | 1 + 11 files changed, 199 insertions(+), 84 deletions(-) create mode 100644 config/pkg/ext/ext-gearman.yml create mode 100644 config/pkg/lib/libgearman.yml create mode 100644 src/Package/Extension/gearman.php create mode 100644 src/Package/Library/libgearman.php diff --git a/composer.lock b/composer.lock index 5df074a6..9ccd220c 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "laravel/prompts", - "version": "v0.3.16", + "version": "v0.3.17", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "11e7d5f93803a2190b00e145142cb00a33d17ad2" + "reference": "6a82ac19a28b916ae0885828795dbd4c59d9a818" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/11e7d5f93803a2190b00e145142cb00a33d17ad2", - "reference": "11e7d5f93803a2190b00e145142cb00a33d17ad2", + "url": "https://api.github.com/repos/laravel/prompts/zipball/6a82ac19a28b916ae0885828795dbd4c59d9a818", + "reference": "6a82ac19a28b916ae0885828795dbd4c59d9a818", "shasum": "" }, "require": { @@ -61,22 +61,22 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.3.16" + "source": "https://github.com/laravel/prompts/tree/v0.3.17" }, - "time": "2026-03-23T14:35:33+00:00" + "time": "2026-04-20T16:07:33+00:00" }, { "name": "laravel/serializable-closure", - "version": "v2.0.11", + "version": "v2.0.13", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "d1af40ac4a6ccc12bd062a7184f63c9995a63bdd" + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d1af40ac4a6ccc12bd062a7184f63c9995a63bdd", - "reference": "d1af40ac4a6ccc12bd062a7184f63c9995a63bdd", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce", "shasum": "" }, "require": { @@ -124,7 +124,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2026-04-07T13:32:18+00:00" + "time": "2026-04-16T14:03:50+00:00" }, { "name": "php-di/invoker", @@ -359,16 +359,16 @@ }, { "name": "symfony/console", - "version": "v7.4.8", + "version": "v7.4.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707" + "reference": "d7d2b64a45a89d607865927b176fa51c33ddbb58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707", - "reference": "1e92e39c51f95b88e3d66fa2d9f06d1fb45dd707", + "url": "https://api.github.com/repos/symfony/console/zipball/d7d2b64a45a89d607865927b176fa51c33ddbb58", + "reference": "d7d2b64a45a89d607865927b176fa51c33ddbb58", "shasum": "" }, "require": { @@ -433,7 +433,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.8" + "source": "https://github.com/symfony/console/tree/v7.4.9" }, "funding": [ { @@ -453,7 +453,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T13:54:39+00:00" + "time": "2026-04-22T15:21:55+00:00" }, { "name": "symfony/deprecation-contracts", @@ -524,7 +524,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -583,7 +583,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { @@ -607,16 +607,16 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df" + "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/ad1b7b9092976d6c948b8a187cec9faaea9ec1df", - "reference": "ad1b7b9092976d6c948b8a187cec9faaea9ec1df", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57e", + "reference": "4864388bfbd3001ce88e234fab652acd91fdc57e", "shasum": "" }, "require": { @@ -665,7 +665,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.37.0" }, "funding": [ { @@ -685,11 +685,11 @@ "type": "tidelift" } ], - "time": "2026-04-10T16:19:22+00:00" + "time": "2026-04-26T13:13:48+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -750,7 +750,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.37.0" }, "funding": [ { @@ -774,7 +774,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -835,7 +835,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.37.0" }, "funding": [ { @@ -1906,16 +1906,16 @@ }, { "name": "amphp/socket", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", - "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", + "url": "https://api.github.com/repos/amphp/socket/zipball/dadb63c5d3179fd83803e29dfeac27350e619314", + "reference": "dadb63c5d3179fd83803e29dfeac27350e619314", "shasum": "" }, "require": { @@ -1924,17 +1924,17 @@ "amphp/dns": "^2", "ext-openssl": "*", "kelunik/certificate": "^1.1", - "league/uri": "^6.5 | ^7", - "league/uri-interfaces": "^2.3 | ^7", + "league/uri": "^7", + "league/uri-interfaces": "^7", "php": ">=8.1", - "revolt/event-loop": "^1 || ^0.2" + "revolt/event-loop": "^1" }, "require-dev": { "amphp/php-cs-fixer-config": "^2", "amphp/phpunit-util": "^3", "amphp/process": "^2", "phpunit/phpunit": "^9", - "psalm/phar": "5.20" + "psalm/phar": "6.16.1" }, "type": "library", "autoload": { @@ -1978,7 +1978,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.3.1" + "source": "https://github.com/amphp/socket/tree/v2.4.0" }, "funding": [ { @@ -1986,7 +1986,7 @@ "type": "github" } ], - "time": "2024-04-21T14:33:03+00:00" + "time": "2026-04-19T15:09:56+00:00" }, { "name": "amphp/sync", @@ -2885,16 +2885,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.95.0", + "version": "v3.95.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "4ba5ab77108583d2a89ed48e1a5c01e62cc1d3f4" + "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/4ba5ab77108583d2a89ed48e1a5c01e62cc1d3f4", - "reference": "4ba5ab77108583d2a89ed48e1a5c01e62cc1d3f4", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a9727678fbd12997f1d9de8f4a37824ed9df1065", + "reference": "a9727678fbd12997f1d9de8f4a37824ed9df1065", "shasum": "" }, "require": { @@ -2978,7 +2978,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.95.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.1" }, "funding": [ { @@ -2986,7 +2986,7 @@ "type": "github" } ], - "time": "2026-04-11T17:30:38+00:00" + "time": "2026-04-12T17:00:09+00:00" }, { "name": "humbug/box", @@ -3235,16 +3235,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "6.8.0", + "version": "6.8.2", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc" + "reference": "2c89ebb95ca9cedc9347f780333f7b25792dcb76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", - "reference": "89ac92bcfe5d0a8a4433c7b89d394553ae7250cc", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/2c89ebb95ca9cedc9347f780333f7b25792dcb76", + "reference": "2c89ebb95ca9cedc9347f780333f7b25792dcb76", "shasum": "" }, "require": { @@ -3254,7 +3254,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "3.3.0", - "json-schema/json-schema-test-suite": "^23.2", + "json-schema/json-schema-test-suite": "dev-main", "marc-mabe/php-enum-phpstan": "^2.0", "phpspec/prophecy": "^1.19", "phpstan/phpstan": "^1.12", @@ -3304,9 +3304,9 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.8.0" + "source": "https://github.com/jsonrainbow/json-schema/tree/6.8.2" }, - "time": "2026-04-02T12:43:11+00:00" + "time": "2026-05-05T05:39:01+00:00" }, { "name": "kelunik/certificate", @@ -4347,11 +4347,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.46", + "version": "2.1.54", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", - "reference": "a193923fc2d6325ef4e741cf3af8c3e8f54dbf25", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8be50c3992107dc837b17da4d140fbbdf9a5c5bd", + "reference": "8be50c3992107dc837b17da4d140fbbdf9a5c5bd", "shasum": "" }, "require": { @@ -4396,7 +4396,7 @@ "type": "github" } ], - "time": "2026-04-01T09:25:14+00:00" + "time": "2026-04-29T13:31:09+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6651,16 +6651,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v8.0.8", + "version": "v8.0.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6" + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f662acc6ab22a3d6d716dcb44c381c6002940df6", - "reference": "f662acc6ab22a3d6d716dcb44c381c6002940df6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0c3c1a17604c4dbbec4b93fe162c538482096e1f", + "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f", "shasum": "" }, "require": { @@ -6712,7 +6712,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.9" }, "funding": [ { @@ -6732,7 +6732,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-04-18T13:51:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -6812,16 +6812,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.8", + "version": "v7.4.9", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5" + "reference": "dcd8f96bcdc0f128ec406c765cc066c6035d1be3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/58b9790d12f9670b7f53a1c1738febd3108970a5", - "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/dcd8f96bcdc0f128ec406c765cc066c6035d1be3", + "reference": "dcd8f96bcdc0f128ec406c765cc066c6035d1be3", "shasum": "" }, "require": { @@ -6858,7 +6858,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.8" + "source": "https://github.com/symfony/filesystem/tree/v7.4.9" }, "funding": [ { @@ -6878,7 +6878,7 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-04-18T13:18:21+00:00" }, { "name": "symfony/finder", @@ -7021,7 +7021,7 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", @@ -7081,7 +7081,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.37.0" }, "funding": [ { @@ -7105,7 +7105,7 @@ }, { "name": "symfony/polyfill-php84", - "version": "v1.34.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", @@ -7161,7 +7161,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.34.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.37.0" }, "funding": [ { diff --git a/config/env.ini b/config/env.ini index 94797118..4df65520 100644 --- a/config/env.ini +++ b/config/env.ini @@ -94,7 +94,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime ; `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=native-native-musl +SPC_TARGET=native-native ; compiler environments (default value is defined by selected toolchain) CC=${SPC_DEFAULT_CC} @@ -103,8 +103,8 @@ AR=${SPC_DEFAULT_AR} 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_CXX_FLAGS="${SPC_DEFAULT_C_FLAGS}" +SPC_DEFAULT_LD_FLAGS="-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 @@ -114,13 +114,13 @@ 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_C_FLAGS}" ; EXTRA_CXXFLAGS for `configure` and `make` php SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fPIE ${SPC_DEFAULT_CXX_FLAGS}" ; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so diff --git a/config/pkg/ext/ext-gearman.yml b/config/pkg/ext/ext-gearman.yml new file mode 100644 index 00000000..eb01dc7b --- /dev/null +++ b/config/pkg/ext/ext-gearman.yml @@ -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: custom diff --git a/config/pkg/lib/libevent.yml b/config/pkg/lib/libevent.yml index aa4d0d52..1e4b8e86 100644 --- a/config/pkg/lib/libevent.yml +++ b/config/pkg/lib/libevent.yml @@ -16,3 +16,4 @@ libevent: - libevent_core.a - libevent_extra.a - libevent_openssl.a + - libevent_pthreads.a diff --git a/config/pkg/lib/libgearman.yml b/config/pkg/lib/libgearman.yml new file mode 100644 index 00000000..a5a93699 --- /dev/null +++ b/config/pkg/lib/libgearman.yml @@ -0,0 +1,23 @@ +libgearman: + type: library + artifact: + source: + type: ghrel + repo: gearman/gearmand + match: gearmand-.+\.tar\.gz + prefer-stable: true + metadata: + license-files: [COPYING] + license: BSD-3-Clause + depends: + - libevent + - libuuid + suggests: + - libmemcached + headers@unix: + - libgearman-1.0/gearman.h + lang: cpp + pkg-configs: + - gearmand + static-libs@unix: + - libgearman.a diff --git a/src/Package/Extension/gearman.php b/src/Package/Extension/gearman.php new file mode 100644 index 00000000..e7b516e7 --- /dev/null +++ b/src/Package/Extension/gearman.php @@ -0,0 +1,20 @@ +getLibraryPackage('libgearman')->getBuildRootPath(); + } +} diff --git a/src/Package/Library/libevent.php b/src/Package/Library/libevent.php index 0e3dffe6..4d0c352a 100644 --- a/src/Package/Library/libevent.php +++ b/src/Package/Library/libevent.php @@ -57,7 +57,6 @@ class libevent ->addConfigureArgs( '-DEVENT__LIBRARY_TYPE=STATIC', '-DEVENT__DISABLE_BENCHMARK=ON', - '-DEVENT__DISABLE_THREAD_SUPPORT=ON', '-DEVENT__DISABLE_TESTS=ON', '-DEVENT__DISABLE_SAMPLES=ON', '-DEVENT__DISABLE_MBEDTLS=ON ', @@ -67,7 +66,7 @@ class libevent } $cmake->build(); - $lib->patchPkgconfPrefix(['libevent.pc', 'libevent_core.pc', 'libevent_extra.pc', 'libevent_openssl.pc']); + $lib->patchPkgconfPrefix(['libevent.pc', 'libevent_core.pc', 'libevent_extra.pc', 'libevent_openssl.pc', 'libevent_pthreads.pc']); $lib->patchPkgconfPrefix( ['libevent_openssl.pc'], diff --git a/src/Package/Library/libgearman.php b/src/Package/Library/libgearman.php new file mode 100644 index 00000000..65052f8e --- /dev/null +++ b/src/Package/Library/libgearman.php @@ -0,0 +1,55 @@ +getSourceDir() . '/configure', + 'as_fn_error $? "could not find boost" "$LINENO" 5', + ':', + ); + return true; + } + + #[BuildFor('Linux')] + #[BuildFor('Darwin')] + public function build(LibraryPackage $lib): void + { + UnixAutoconfExecutor::create($lib) + ->appendEnv([ + 'CFLAGS' => '-Wno-error', + 'CXXFLAGS' => '-std=c++17 -Wno-error', + ]) + ->optionalPackage('libmemcached', '--enable-libmemcached', '--disable-libmemcached') + ->removeConfigureArgs('--enable-pic') + ->configure( + '--disable-libdrizzle', + '--disable-libtokyocabinet', + '--disable-libpq', + '--disable-jobserver', + '--without-mysql', + ) + // gearmand is a server+library project; we only need libgearman (client lib) + ->make( + target: 'configmake.h libhashkit-1.0/configure.h libgearman/error_code.hpp libgearman/command.hpp libtest/version.h libgearman/libgearman.la', + with_install: 'install-libLTLIBRARIES install-nobase_includeHEADERS install-pkgconfigDATA', + ); + $lib->patchPkgconfPrefix(['gearmand.pc']); + } +} diff --git a/src/Package/Target/php/unix.php b/src/Package/Target/php/unix.php index 092bb8f4..f001bdb8 100644 --- a/src/Package/Target/php/unix.php +++ b/src/Package/Target/php/unix.php @@ -757,7 +757,7 @@ trait unix return array_filter([ 'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), 'EXTRA_CXXFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS'), - 'EXTRA_LDFLAGS_PROGRAM' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS') . "{$config['ldflags']} {$static} {$pie}", + 'EXTRA_LDFLAGS_PROGRAM' => deduplicate_flags(getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS') . " {$config['ldflags']} {$static} {$pie}"), 'EXTRA_LDFLAGS' => $config['ldflags'], 'EXTRA_LIBS' => $libs, ]); diff --git a/src/StaticPHP/Doctor/Item/LinuxToolCheck.php b/src/StaticPHP/Doctor/Item/LinuxToolCheck.php index c755c43f..21ce5874 100644 --- a/src/StaticPHP/Doctor/Item/LinuxToolCheck.php +++ b/src/StaticPHP/Doctor/Item/LinuxToolCheck.php @@ -13,7 +13,7 @@ use StaticPHP\Util\System\LinuxUtil; class LinuxToolCheck { public const TOOLS_ALPINE = [ - 'make', 'bison', 're2c', 'flex', + 'make', 'bison', 're2c', 'flex', 'gperf', 'git', 'autoconf', 'automake', 'gettext-dev', 'tar', 'unzip', 'gzip', 'bzip2', 'cmake', 'gcc', @@ -22,7 +22,7 @@ class LinuxToolCheck ]; public const TOOLS_DEBIAN = [ - 'make', 'bison', 're2c', 'flex', + 'make', 'bison', 're2c', 'flex', 'gperf', 'git', 'autoconf', 'automake', 'autopoint', 'tar', 'unzip', 'gzip', 'gcc', 'g++', 'bzip2', 'cmake', 'patch', @@ -30,7 +30,7 @@ class LinuxToolCheck ]; public const TOOLS_RHEL = [ - 'perl', 'make', 'bison', 're2c', 'flex', + 'perl', 'make', 'bison', 're2c', 'flex', 'gperf', 'git', 'autoconf', 'automake', 'tar', 'unzip', 'gzip', 'gcc', 'g++', 'bzip2', 'cmake', 'patch', 'which', @@ -38,7 +38,7 @@ class LinuxToolCheck ]; public const TOOLS_ARCH = [ - 'base-devel', 'cmake', + 'base-devel', 'cmake', 'gperf', ]; private const PROVIDED_COMMAND = [ diff --git a/src/StaticPHP/Doctor/Item/MacOSToolCheck.php b/src/StaticPHP/Doctor/Item/MacOSToolCheck.php index 54d62e44..9a256c08 100644 --- a/src/StaticPHP/Doctor/Item/MacOSToolCheck.php +++ b/src/StaticPHP/Doctor/Item/MacOSToolCheck.php @@ -18,6 +18,7 @@ class MacOSToolCheck 'bison', 're2c', 'flex', + 'gperf', 'pkg-config', 'git', 'autoconf',