diff --git a/config/ext.json b/config/ext.json index 0106f6e55..32c6ea346 100644 --- a/config/ext.json +++ b/config/ext.json @@ -513,6 +513,14 @@ "tokenizer": { "type": "builtin" }, + "uuid": { + "type": "external", + "source": "ext-uuid", + "arg-type": "with-prefix", + "lib-depends": [ + "libuuid" + ] + }, "uv": { "type": "external", "source": "ext-uv", diff --git a/config/lib.json b/config/lib.json index b64cc7c44..586e3f960 100644 --- a/config/lib.json +++ b/config/lib.json @@ -337,6 +337,12 @@ "libtiff.a" ] }, + "libuuid": { + "source": "libuuid", + "static-libs-unix": [ + "libuuid.a" + ] + }, "libuv": { "source": "libuv", "static-libs-unix": [ diff --git a/config/source.json b/config/source.json index 37b5a7e05..c9d8c687d 100644 --- a/config/source.json +++ b/config/source.json @@ -100,6 +100,16 @@ "path": "LICENSE" } }, + "ext-uuid": { + "type": "url", + "url": "https://pecl.php.net/get/uuid", + "path": "php-src/ext/uuid", + "filename": "uuid.tgz", + "license": { + "type": "file", + "path": "LICENSE" + } + }, "ext-uv": { "type": "url", "url": "https://pecl.php.net/get/uv", @@ -334,6 +344,15 @@ "path": "LICENSE.md" } }, + "libuuid": { + "type": "git", + "url": "https://github.com/cloudbase/libuuid.git", + "rev": "master", + "license": { + "type": "file", + "path": "COPYING" + } + }, "libuv": { "type": "ghtar", "repo": "libuv/libuv", diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index 353304061..63eae94e2 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -25,7 +25,7 @@ */ final class ConsoleApplication extends Application { - public const VERSION = '2.1.2'; + public const VERSION = '2.1.3'; public function __construct() { diff --git a/src/SPC/builder/linux/library/libuuid.php b/src/SPC/builder/linux/library/libuuid.php new file mode 100644 index 000000000..85f0d2152 --- /dev/null +++ b/src/SPC/builder/linux/library/libuuid.php @@ -0,0 +1,12 @@ +cd($this->source_dir) + ->exec('chmod +x configure') + ->exec('chmod +x install-sh') + ->exec( + './configure ' . + '--enable-static --disable-shared ' . + '--prefix=' + ) + ->exec('make clean') + ->exec("make -j{$this->builder->concurrency}") + ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); + $this->patchPkgconfPrefix(['uuid.pc']); + } +} diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index ba11efbb3..c01071be5 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,13 +13,13 @@ // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'imagick,zstd,bz2,zip,xml,dom', + 'Linux', 'Darwin' => 'uuid', 'Windows' => 'mbstring,pdo_sqlite,mbregex,ffi', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). $with_libs = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'xz', + 'Linux', 'Darwin' => '', 'Windows' => '', };