2023-12-23 16:23:37 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
2025-06-09 01:07:30 +08:00
|
|
|
use SPC\builder\unix\executor\UnixCMakeExecutor;
|
2023-12-23 16:23:37 +08:00
|
|
|
use SPC\exception\FileSystemException;
|
|
|
|
|
use SPC\exception\RuntimeException;
|
|
|
|
|
|
|
|
|
|
trait libuv
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @throws FileSystemException
|
|
|
|
|
* @throws RuntimeException
|
|
|
|
|
*/
|
|
|
|
|
protected function build(): void
|
|
|
|
|
{
|
2025-06-09 01:07:30 +08:00
|
|
|
UnixCMakeExecutor::create($this)
|
|
|
|
|
->addConfigureArgs('-DLIBUV_BUILD_SHARED=OFF')
|
|
|
|
|
->build();
|
2023-12-23 16:23:37 +08:00
|
|
|
// patch pkgconfig
|
|
|
|
|
$this->patchPkgconfPrefix(['libuv-static.pc']);
|
|
|
|
|
}
|
|
|
|
|
}
|