31 lines
744 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace SPC\builder\linux\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
2025-06-09 19:32:31 +08:00
use SPC\util\executor\UnixAutoconfExecutor;
class libffi extends LinuxLibraryBase
{
public const NAME = 'libffi';
/**
* @throws RuntimeException
* @throws FileSystemException
*/
public function build(): void
{
2025-06-09 19:32:31 +08:00
UnixAutoconfExecutor::create($this)
2025-07-16 12:28:22 +07:00
->configure()->make();
if (is_file(BUILD_ROOT_PATH . '/lib64/libffi.a')) {
copy(BUILD_ROOT_PATH . '/lib64/libffi.a', BUILD_ROOT_PATH . '/lib/libffi.a');
unlink(BUILD_ROOT_PATH . '/lib64/libffi.a');
}
$this->patchPkgconfPrefix(['libffi.pc']);
}
}