add liburing for swoole

This commit is contained in:
DubbleClick
2025-08-25 22:57:04 +07:00
parent 37e0f1d3f3
commit 2694dd9e21
5 changed files with 62 additions and 1 deletions

View 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']);
}
}