Add ext-sqlite3,ext-pdo_sqlite

This commit is contained in:
crazywhalecc 2026-03-12 22:27:42 +08:00
parent f85f29e628
commit 6af55323b3
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 41 additions and 0 deletions

View File

@ -196,6 +196,14 @@ ext-pdo_pgsql:
php-extension:
arg-type@unix: with-path
arg-type@windows: '--with-pdo-pgsql=yes'
ext-pdo_sqlite:
type: php-extension
depends:
- ext-pdo
- ext-sqlite3
- sqlite
php-extension:
arg-type: with
ext-pgsql:
type: php-extension
depends@unix:
@ -221,6 +229,14 @@ ext-session:
type: php-extension
ext-sockets:
type: php-extension
ext-sqlite3:
type: php-extension
depends:
- sqlite
php-extension:
arg-type@unix: with-path
arg-type@windows: with
build-with-php: true
ext-xml:
type: php-extension
depends:

View File

@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace Package\Extension;
use Package\Target\php;
use StaticPHP\Attribute\Package\BeforeStage;
use StaticPHP\Attribute\Package\Extension;
use StaticPHP\Package\PackageInstaller;
use StaticPHP\Util\FileSystem;
#[Extension('pdo_sqlite')]
class pdo_sqlite
{
#[BeforeStage('php', [php::class, 'configureForUnix'], 'ext-pdo_sqlite')]
public function patchBeforeConfigure(PackageInstaller $installer): void
{
FileSystem::replaceFileRegex(
"{$installer->getTargetPackage('php')->getSourceDir()}/configure",
'/sqlite3_column_table_name=yes/',
'sqlite3_column_table_name=no'
);
}
}