2023-05-10 02:04:08 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('imagick')]
|
|
|
|
|
class imagick extends Extension
|
|
|
|
|
{
|
2023-10-17 20:16:41 +02:00
|
|
|
public function patchBeforeMake(): bool
|
2023-08-20 19:51:45 +08:00
|
|
|
{
|
2023-10-17 19:37:13 +02:00
|
|
|
// imagick may call omp_pause_all which requires -lgomp
|
2023-08-20 19:51:45 +08:00
|
|
|
$extra_libs = $this->builder->getOption('extra-libs', '');
|
2023-10-27 17:33:43 +02:00
|
|
|
$extra_libs .= ' -lgomp ';
|
2023-08-20 19:51:45 +08:00
|
|
|
$this->builder->setOption('extra-libs', $extra_libs);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 02:04:08 +08:00
|
|
|
public function getUnixConfigureArg(): string
|
|
|
|
|
{
|
|
|
|
|
return '--with-imagick=' . BUILD_ROOT_PATH;
|
|
|
|
|
}
|
|
|
|
|
}
|