2023-04-29 18:59:47 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
|
|
2025-06-09 09:24:31 +08:00
|
|
|
use SPC\util\executor\UnixCMakeExecutor;
|
2023-04-29 18:59:47 +08:00
|
|
|
|
|
|
|
|
trait libssh2
|
|
|
|
|
{
|
2023-08-20 19:51:45 +08:00
|
|
|
protected function build(): void
|
2023-04-29 18:59:47 +08:00
|
|
|
{
|
2025-06-09 01:07:30 +08:00
|
|
|
UnixCMakeExecutor::create($this)
|
|
|
|
|
->optionalLib('zlib', ...cmake_boolean_args('ENABLE_ZLIB_COMPRESSION'))
|
|
|
|
|
->addConfigureArgs(
|
|
|
|
|
'-DBUILD_EXAMPLES=OFF',
|
|
|
|
|
'-DBUILD_TESTING=OFF'
|
2023-04-29 18:59:47 +08:00
|
|
|
)
|
2025-06-09 01:07:30 +08:00
|
|
|
->build();
|
|
|
|
|
|
2023-04-29 18:59:47 +08:00
|
|
|
$this->patchPkgconfPrefix(['libssh2.pc']);
|
|
|
|
|
}
|
|
|
|
|
}
|