mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add ext-zip
This commit is contained in:
parent
ca15ccd4d1
commit
5d309ee998
17
config/pkg/ext/ext-zip.yml
Normal file
17
config/pkg/ext/ext-zip.yml
Normal 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
|
||||
20
src/Package/Extension/zip.php
Normal file
20
src/Package/Extension/zip.php
Normal 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';
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user