mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
parent
584f96484c
commit
6b8df97282
@ -471,6 +471,14 @@
|
||||
"tokenizer": {
|
||||
"type": "builtin"
|
||||
},
|
||||
"uv": {
|
||||
"type": "external",
|
||||
"source": "ext-uv",
|
||||
"arg-type": "with-prefix",
|
||||
"lib-depends": [
|
||||
"libuv"
|
||||
]
|
||||
},
|
||||
"xlswriter": {
|
||||
"type": "external",
|
||||
"source": "xlswriter",
|
||||
|
||||
@ -284,6 +284,12 @@
|
||||
"zlib"
|
||||
]
|
||||
},
|
||||
"libuv": {
|
||||
"source": "libuv",
|
||||
"static-libs-unix": [
|
||||
"libuv.a"
|
||||
]
|
||||
},
|
||||
"libwebp": {
|
||||
"source": "libwebp",
|
||||
"static-libs-unix": [
|
||||
|
||||
@ -100,6 +100,16 @@
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"ext-uv": {
|
||||
"type": "url",
|
||||
"url": "https://pecl.php.net/get/uv",
|
||||
"path": "php-src/ext/uv",
|
||||
"filename": "uv.tgz",
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
}
|
||||
},
|
||||
"ext-zstd": {
|
||||
"type": "git",
|
||||
"path": "php-src/ext/zstd",
|
||||
@ -279,6 +289,20 @@
|
||||
"path": "COPYING"
|
||||
}
|
||||
},
|
||||
"libuv": {
|
||||
"type": "ghtar",
|
||||
"repo": "libuv/libuv",
|
||||
"license": [
|
||||
{
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "LICENSE-extra"
|
||||
}
|
||||
]
|
||||
},
|
||||
"libwebp": {
|
||||
"type": "url",
|
||||
"url": "https://github.com/webmproject/libwebp/archive/refs/tags/v1.3.2.tar.gz",
|
||||
|
||||
12
src/SPC/builder/linux/library/libuv.php
Normal file
12
src/SPC/builder/linux/library/libuv.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\linux\library;
|
||||
|
||||
class libuv extends LinuxLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\libuv;
|
||||
|
||||
public const NAME = 'libuv';
|
||||
}
|
||||
12
src/SPC/builder/macos/library/libuv.php
Normal file
12
src/SPC/builder/macos/library/libuv.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\macos\library;
|
||||
|
||||
class libuv extends MacOSLibraryBase
|
||||
{
|
||||
use \SPC\builder\unix\library\libuv;
|
||||
|
||||
public const NAME = 'libuv';
|
||||
}
|
||||
29
src/SPC/builder/unix/library/libuv.php
Normal file
29
src/SPC/builder/unix/library/libuv.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\unix\library;
|
||||
|
||||
use SPC\exception\FileSystemException;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\store\FileSystem;
|
||||
|
||||
trait libuv
|
||||
{
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function build(): void
|
||||
{
|
||||
// CMake needs a clean build directory
|
||||
FileSystem::resetDir($this->source_dir . '/build');
|
||||
// Start build
|
||||
shell()->cd($this->source_dir . '/build')
|
||||
->exec("cmake {$this->builder->makeCmakeArgs()} -DLIBUV_BUILD_SHARED=OFF ..")
|
||||
->exec("cmake --build . -j {$this->builder->concurrency}")
|
||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||
// patch pkgconfig
|
||||
$this->patchPkgconfPrefix(['libuv-static.pc']);
|
||||
}
|
||||
}
|
||||
@ -9,10 +9,10 @@ $extensions = 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gm
|
||||
$additional_libs = 'libwebp,libavif,libjpeg,freetype';
|
||||
|
||||
# If you want to test additional extensions, add them below. (comma start)
|
||||
$extensions .= ',igbinary';
|
||||
$extensions .= ',uv';
|
||||
|
||||
# If you want to test additional features for extensions, add libs below. (comma start like extensions)
|
||||
$additional_libs .= ',liblz4';
|
||||
$additional_libs .= '';
|
||||
|
||||
if (!isset($argv[1])) {
|
||||
exit("Please use 'extensions', 'cmd' or 'libs' as output type");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user