From a9e6e4a22630024323a8c4bb163e5e3499cbf61a Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 8 Mar 2026 16:32:31 +0800 Subject: [PATCH] Add dba --- config/pkg/ext/builtin-extensions.yml | 6 ++++++ src/Package/Extension/dba.php | 28 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/Package/Extension/dba.php diff --git a/config/pkg/ext/builtin-extensions.yml b/config/pkg/ext/builtin-extensions.yml index 52f14924..b71e44ac 100644 --- a/config/pkg/ext/builtin-extensions.yml +++ b/config/pkg/ext/builtin-extensions.yml @@ -20,6 +20,12 @@ ext-curl: - ext-openssl php-extension: arg-type: with +ext-dba: + type: php-extension + suggests: + - qdbm + php-extension: + arg-type: custom ext-mbregex: type: php-extension depends: diff --git a/src/Package/Extension/dba.php b/src/Package/Extension/dba.php new file mode 100644 index 00000000..d16d979d --- /dev/null +++ b/src/Package/Extension/dba.php @@ -0,0 +1,28 @@ +getLibraryPackage('qdbm')) ? (" --with-qdbm={$qdbm->getBuildRootPath()}") : ''; + return '--enable-dba' . ($shared ? '=shared' : '') . $qdbm; + } + + #[CustomPhpConfigureArg('Windows')] + public function getWindowsConfigureArg(PackageInstaller $installer): string + { + $qdbm = $installer->getLibraryPackage('qdbm') ? ' --with-qdbm' : ''; + return '--with-dba' . $qdbm; + } +}