2025-03-23 16:26:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
|
|
|
|
use SPC\store\FileSystem;
|
|
|
|
|
use SPC\util\CustomExt;
|
|
|
|
|
|
|
|
|
|
#[CustomExt('pdo_odbc')]
|
|
|
|
|
class pdo_odbc extends Extension
|
|
|
|
|
{
|
|
|
|
|
public function patchBeforeBuildconf(): bool
|
|
|
|
|
{
|
|
|
|
|
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/pdo_odbc/config.m4', 'PDO_ODBC_LDFLAGS="$pdo_odbc_def_ldflags', 'PDO_ODBC_LDFLAGS="-liconv $pdo_odbc_def_ldflags');
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-27 11:12:19 +07:00
|
|
|
public function getUnixConfigureArg(bool $shared = false): string
|
2025-03-23 16:26:36 +01:00
|
|
|
{
|
|
|
|
|
return '--with-pdo-odbc=unixODBC,' . BUILD_ROOT_PATH;
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-21 12:01:00 +07:00
|
|
|
public function getWindowsConfigureArg(bool $shared = false): string
|
2025-03-23 16:26:36 +01:00
|
|
|
{
|
|
|
|
|
return '--with-pdo-odbc';
|
|
|
|
|
}
|
|
|
|
|
}
|