add libuv dependency for swow, but still not working

This commit is contained in:
crazywhalecc
2023-03-19 14:04:42 +08:00
parent f06736315d
commit e4b37b9f9a
5 changed files with 51 additions and 0 deletions

View File

@@ -270,6 +270,7 @@ class Extension
case 'swow':
$arg .= $this->builder->getLib('openssl') ? ' --enable-swow-ssl' : ' --disable-swow-ssl';
$arg .= $this->builder->getLib('curl') ? ' --enable-swow-curl' : ' --disable-swow-curl';
$arg .= ' SWOW_UV_CFLAGS=-I"' . BUILD_INCLUDE_PATH . '" ';
break;
case 'swoole':
if ($this->builder->getLib('openssl')) {

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
/**
* is a template library class for unix
*/
class libuv extends MacOSLibraryBase
{
public const NAME = 'libuv';
protected function build()
{
[,,$destdir] = SEPARATED_PATH;
f_passthru(
$this->builder->set_x . ' && ' .
"cd {$this->source_dir} && " .
"{$this->builder->configure_env} ./configure " .
'--enable-static --disable-shared ' .
'--prefix= && ' . // use prefix=/
'make clean && ' .
"make -j{$this->builder->concurrency} && " .
'make install DESTDIR=' . $destdir
);
}
}