Add ext-imagick

This commit is contained in:
crazywhalecc 2026-03-10 22:19:01 +08:00
parent d7eb33ff1e
commit e31aeabf12
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,13 @@
ext-imagick:
type: php-extension
artifact:
source:
type: pecl
name: imagick
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- imagemagick
php-extension:
arg-type: custom

View File

@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Package\Extension;
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
use StaticPHP\Attribute\Package\Extension;
use StaticPHP\Package\PackageBuilder;
#[Extension('imagick')]
class imagick
{
#[CustomPhpConfigureArg('Darwin')]
#[CustomPhpConfigureArg('Linux')]
public function getUnixConfigureArg(bool $shared, PackageBuilder $builder): string
{
$disable_omp = ' ac_cv_func_omp_pause_resource_all=no';
return '--with-imagick=' . ($shared ? 'shared,' : '') . $builder->getBuildRootPath() . $disable_omp;
}
}