mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Forward-port #1107
This commit is contained in:
@@ -22,8 +22,14 @@ class decimal extends PhpExtensionPackage
|
||||
{
|
||||
FileSystem::replaceFileStr(
|
||||
$this->getSourceDir() . '/php_decimal.c',
|
||||
'zend_module_entry decimal_module_entry',
|
||||
'zend_module_entry php_decimal_module_entry'
|
||||
[
|
||||
'zend_module_entry decimal_module_entry',
|
||||
'ZEND_GET_MODULE(decimal)',
|
||||
],
|
||||
[
|
||||
'zend_module_entry php_decimal_module_entry',
|
||||
'ZEND_GET_MODULE(php_decimal)',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ use StaticPHP\Package\LibraryPackage;
|
||||
use StaticPHP\Package\PackageInstaller;
|
||||
use StaticPHP\Runtime\Executor\UnixAutoconfExecutor;
|
||||
use StaticPHP\Runtime\SystemTarget;
|
||||
use StaticPHP\Toolchain\Interface\ToolchainInterface;
|
||||
use StaticPHP\Toolchain\ZigToolchain;
|
||||
use StaticPHP\Util\SPCConfigUtil;
|
||||
|
||||
#[Library('krb5')]
|
||||
@@ -17,7 +19,7 @@ class krb5
|
||||
{
|
||||
#[BuildFor('Linux')]
|
||||
#[BuildFor('Darwin')]
|
||||
public function build(LibraryPackage $lib, PackageInstaller $installer): void
|
||||
public function build(LibraryPackage $lib, PackageInstaller $installer, ToolchainInterface $toolchain): void
|
||||
{
|
||||
if (!file_exists($lib->getSourceRoot() . '/configure')) {
|
||||
shell()->cd($lib->getSourceRoot())->exec('autoreconf -if');
|
||||
@@ -45,12 +47,15 @@ class krb5
|
||||
$extraEnv['LDFLAGS'] = '-framework Kerberos';
|
||||
$args[] = 'ac_cv_func_secure_getenv=no';
|
||||
}
|
||||
UnixAutoconfExecutor::create($lib)
|
||||
$executor = UnixAutoconfExecutor::create($lib)
|
||||
->appendEnv($extraEnv)
|
||||
->optionalPackage('ldap', '--with-ldap', '--without-ldap')
|
||||
->optionalPackage('libedit', '--with-libedit', '--without-libedit')
|
||||
->configure(...$args)
|
||||
->make();
|
||||
->configure(...$args);
|
||||
if ($toolchain instanceof ZigToolchain) {
|
||||
$executor->exec('find . -name Makefile -exec sed -i "s/-Werror=incompatible-pointer-types//g" {} +');
|
||||
}
|
||||
$executor->make();
|
||||
$lib->patchPkgconfPrefix([
|
||||
'krb5-gssapi.pc',
|
||||
'krb5.pc',
|
||||
|
||||
Reference in New Issue
Block a user