mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 23:05:41 +08:00
Add idn2
This commit is contained in:
33
src/Package/Library/idn2.php
Normal file
33
src/Package/Library/idn2.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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('idn2')]
|
||||
class idn2
|
||||
{
|
||||
#[BuildFor('Linux')]
|
||||
#[BuildFor('Darwin')]
|
||||
public function build(LibraryPackage $lib): void
|
||||
{
|
||||
UnixAutoconfExecutor::create($lib)
|
||||
->configure(
|
||||
'--disable-nls',
|
||||
'--disable-doc',
|
||||
'--enable-year2038',
|
||||
'--disable-rpath'
|
||||
)
|
||||
->optionalPackage('libiconv', '--with-libiconv-prefix=' . BUILD_ROOT_PATH)
|
||||
->optionalPackage('libunistring', '--with-libunistring-prefix=' . BUILD_ROOT_PATH)
|
||||
->optionalPackage('gettext', '--with-libnintl-prefix=' . BUILD_ROOT_PATH)
|
||||
->make();
|
||||
$lib->patchPkgconfPrefix(['libidn2.pc']);
|
||||
$lib->patchLaDependencyPrefix();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user