2025-11-30 15:35:04 +08:00
|
|
|
<?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('libiconv')]
|
|
|
|
|
class libiconv
|
|
|
|
|
{
|
2026-02-02 15:35:59 +08:00
|
|
|
#[BuildFor('Linux')]
|
2025-11-30 15:35:04 +08:00
|
|
|
#[BuildFor('Darwin')]
|
2026-02-02 15:35:59 +08:00
|
|
|
public function build(LibraryPackage $lib): void
|
2025-11-30 15:35:04 +08:00
|
|
|
{
|
2026-02-02 15:35:59 +08:00
|
|
|
UnixAutoconfExecutor::create($lib)
|
2025-11-30 15:35:04 +08:00
|
|
|
->configure(
|
|
|
|
|
'--enable-extra-encodings',
|
|
|
|
|
'--enable-year2038',
|
|
|
|
|
)
|
|
|
|
|
->make('install-lib', with_install: false)
|
2026-02-02 15:35:59 +08:00
|
|
|
->make('install-lib', with_install: false, dir: $lib->getSourceDir() . '/libcharset');
|
|
|
|
|
$lib->patchLaDependencyPrefix();
|
2025-11-30 15:35:04 +08:00
|
|
|
}
|
|
|
|
|
}
|