mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
add liburing for swoole
This commit is contained in:
parent
37e0f1d3f3
commit
2694dd9e21
@ -846,6 +846,11 @@
|
|||||||
"zstd",
|
"zstd",
|
||||||
"unixodbc"
|
"unixodbc"
|
||||||
],
|
],
|
||||||
|
"lib-suggests-linux": [
|
||||||
|
"zstd",
|
||||||
|
"unixodbc",
|
||||||
|
"liburing"
|
||||||
|
],
|
||||||
"ext-depends": [
|
"ext-depends": [
|
||||||
"openssl",
|
"openssl",
|
||||||
"curl"
|
"curl"
|
||||||
|
|||||||
@ -925,5 +925,20 @@
|
|||||||
"zstd.h",
|
"zstd.h",
|
||||||
"zstd_errors.h"
|
"zstd_errors.h"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"liburing": {
|
||||||
|
"source": "liburing",
|
||||||
|
"pkg-configs": [
|
||||||
|
"liburing",
|
||||||
|
"liburing-ffi"
|
||||||
|
],
|
||||||
|
"static-libs-linux": [
|
||||||
|
"liburing.a",
|
||||||
|
"liburing-ffi.a"
|
||||||
|
],
|
||||||
|
"headers-linux": [
|
||||||
|
"liburing/",
|
||||||
|
"liburing.h"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1136,5 +1136,14 @@
|
|||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"liburing": {
|
||||||
|
"type": "ghtar",
|
||||||
|
"repo": "axboe/liburing",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"license": {
|
||||||
|
"type": "file",
|
||||||
|
"path": "COPYING"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ class swoole extends Extension
|
|||||||
}
|
}
|
||||||
$arg .= $this->builder->getLib('nghttp2') ? (' --with-nghttp2-dir=' . BUILD_ROOT_PATH) : '';
|
$arg .= $this->builder->getLib('nghttp2') ? (' --with-nghttp2-dir=' . BUILD_ROOT_PATH) : '';
|
||||||
$arg .= $this->builder->getLib('zstd') ? ' --enable-zstd' : '';
|
$arg .= $this->builder->getLib('zstd') ? ' --enable-zstd' : '';
|
||||||
$arg .= $this->builder->getLib('iouring') ? ' --enable-iouring' : '';
|
$arg .= $this->builder->getLib('liburing') ? ' --enable-iouring' : '';
|
||||||
$arg .= $this->builder->getExt('sockets') ? ' --enable-sockets' : '';
|
$arg .= $this->builder->getExt('sockets') ? ' --enable-sockets' : '';
|
||||||
|
|
||||||
// additional feature: swoole-pgsql, it should depend on lib [postgresql], but it will lack of CFLAGS etc.
|
// additional feature: swoole-pgsql, it should depend on lib [postgresql], but it will lack of CFLAGS etc.
|
||||||
|
|||||||
32
src/SPC/builder/linux/library/liburing.php
Normal file
32
src/SPC/builder/linux/library/liburing.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\linux\library;
|
||||||
|
|
||||||
|
use SPC\util\executor\UnixAutoconfExecutor;
|
||||||
|
|
||||||
|
class liburing extends LinuxLibraryBase
|
||||||
|
{
|
||||||
|
public const NAME = 'liburing';
|
||||||
|
|
||||||
|
protected function build(): void
|
||||||
|
{
|
||||||
|
// Build liburing with static linking via autoconf
|
||||||
|
UnixAutoconfExecutor::create($this)
|
||||||
|
->removeConfigureArgs(
|
||||||
|
'--disable-shared',
|
||||||
|
'--enable-static',
|
||||||
|
'--with-pic',
|
||||||
|
'--enable-pic',
|
||||||
|
)
|
||||||
|
->addConfigureArgs(
|
||||||
|
'--use-libc'
|
||||||
|
)
|
||||||
|
->configure()
|
||||||
|
->make(with_clean: false)
|
||||||
|
->exec("rm -rf {$this->getLibDir()}/*.so*");
|
||||||
|
|
||||||
|
$this->patchPkgconfPrefix(['liburing.pc', 'liburing-ffi.pc']);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user