mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
26 lines
585 B
PHP
26 lines
585 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Package\Library;
|
||
|
|
|
||
|
|
use StaticPHP\Attribute\Package\BuildFor;
|
||
|
|
use StaticPHP\Attribute\Package\Library;
|
||
|
|
use StaticPHP\Package\LibraryPackage;
|
||
|
|
use StaticPHP\Runtime\Executor\UnixAutoconfExecutor;
|
||
|
|
|
||
|
|
#[Library('gmp')]
|
||
|
|
class gmp
|
||
|
|
{
|
||
|
|
#[BuildFor('Linux')]
|
||
|
|
#[BuildFor('Darwin')]
|
||
|
|
public function build(LibraryPackage $lib): void
|
||
|
|
{
|
||
|
|
UnixAutoconfExecutor::create($lib)
|
||
|
|
->appendEnv(['CFLAGS' => '-std=c17'])
|
||
|
|
->configure('--enable-fat')
|
||
|
|
->make();
|
||
|
|
$lib->patchPkgconfPrefix(['gmp.pc']);
|
||
|
|
}
|
||
|
|
}
|