Add ext-zip

This commit is contained in:
crazywhalecc 2026-03-17 15:13:47 +08:00
parent ca15ccd4d1
commit 5d309ee998
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,17 @@
ext-zip:
type: php-extension
artifact:
source:
type: pecl
name: zip
extract: ext-zip
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@unix:
- libzip
php-extension:
support:
BSD: wip
arg-type: custom
arg-type@windows: enable

View File

@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace Package\Extension;
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
use StaticPHP\Attribute\Package\Extension;
use StaticPHP\Package\PhpExtensionPackage;
#[Extension('zip')]
class zip extends PhpExtensionPackage
{
#[CustomPhpConfigureArg('Darwin')]
#[CustomPhpConfigureArg('Linux')]
public function getUnixConfigureArg(bool $shared): string
{
return !$shared ? ('--with-zip=' . BUILD_ROOT_PATH) : '--enable-zip=shared';
}
}