mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\exception\FileSystemException;
|
|
use SPC\exception\RuntimeException;
|
|
use SPC\util\executor\UnixCMakeExecutor;
|
|
|
|
trait libzip
|
|
{
|
|
/**
|
|
* @throws RuntimeException
|
|
* @throws FileSystemException
|
|
*/
|
|
protected function build(): void
|
|
{
|
|
UnixCMakeExecutor::create($this)
|
|
->optionalLib('bzip2', ...cmake_boolean_args('ENABLE_BZIP2'))
|
|
->optionalLib('xz', ...cmake_boolean_args('ENABLE_LZMA'))
|
|
->optionalLib('openssl', ...cmake_boolean_args('ENABLE_OPENSSL'))
|
|
->optionalLib('zstd', ...cmake_boolean_args('ENABLE_ZSTD'))
|
|
->addConfigureArgs(
|
|
'-DENABLE_GNUTLS=OFF',
|
|
'-DENABLE_MBEDTLS=OFF',
|
|
'-DBUILD_DOC=OFF',
|
|
'-DBUILD_EXAMPLES=OFF',
|
|
'-DBUILD_REGRESS=OFF',
|
|
'-DBUILD_TOOLS=OFF',
|
|
)
|
|
->build();
|
|
$this->patchPkgconfPrefix(['libzip.pc'], PKGCONF_PATCH_PREFIX);
|
|
}
|
|
}
|