mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Add ext-imagick
This commit is contained in:
parent
d7eb33ff1e
commit
e31aeabf12
13
config/pkg/ext/ext-imagick.yml
Normal file
13
config/pkg/ext/ext-imagick.yml
Normal 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
|
||||||
21
src/Package/Extension/imagick.php
Normal file
21
src/Package/Extension/imagick.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user