mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add ext-xlswriter
This commit is contained in:
parent
5d309ee998
commit
154adc1f48
18
config/pkg/ext/ext-xlswriter.yml
Normal file
18
config/pkg/ext/ext-xlswriter.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
ext-xlswriter:
|
||||||
|
type: php-extension
|
||||||
|
artifact:
|
||||||
|
source:
|
||||||
|
type: pecl
|
||||||
|
name: xlswriter
|
||||||
|
metadata:
|
||||||
|
license-files: [LICENSE]
|
||||||
|
license: BSD-2-Clause
|
||||||
|
depends:
|
||||||
|
- ext-zlib
|
||||||
|
- ext-zip
|
||||||
|
suggests:
|
||||||
|
- openssl
|
||||||
|
php-extension:
|
||||||
|
support:
|
||||||
|
BSD: wip
|
||||||
|
arg-type: custom
|
||||||
25
src/Package/Extension/xlswriter.php
Normal file
25
src/Package/Extension/xlswriter.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Package\Extension;
|
||||||
|
|
||||||
|
use StaticPHP\Attribute\Package\CustomPhpConfigureArg;
|
||||||
|
use StaticPHP\Attribute\Package\Extension;
|
||||||
|
use StaticPHP\Package\PackageInstaller;
|
||||||
|
use StaticPHP\Package\PhpExtensionPackage;
|
||||||
|
|
||||||
|
#[Extension('xlswriter')]
|
||||||
|
class xlswriter extends PhpExtensionPackage
|
||||||
|
{
|
||||||
|
#[CustomPhpConfigureArg('Darwin')]
|
||||||
|
#[CustomPhpConfigureArg('Linux')]
|
||||||
|
public function getUnixConfigureArg(bool $shared, PackageInstaller $installer): string
|
||||||
|
{
|
||||||
|
$arg = '--with-xlswriter --enable-reader';
|
||||||
|
if ($installer->getLibraryPackage('openssl')) {
|
||||||
|
$arg .= ' --with-openssl=' . $installer->getLibraryPackage('openssl')->getBuildRootPath();
|
||||||
|
}
|
||||||
|
return $arg;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user