mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 20:05:35 +08:00
add windows support for dba-qdbm
This commit is contained in:
@@ -43,9 +43,8 @@
|
|||||||
},
|
},
|
||||||
"dba": {
|
"dba": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type-windows": "with",
|
"arg-type": "custom",
|
||||||
"arg-type-unix": "custom",
|
"lib-suggests": [
|
||||||
"lib-suggests-unix": [
|
|
||||||
"qdbm"
|
"qdbm"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -529,6 +529,12 @@
|
|||||||
"source": "qdbm",
|
"source": "qdbm",
|
||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
"libqdbm.a"
|
"libqdbm.a"
|
||||||
|
],
|
||||||
|
"static-libs-windows": [
|
||||||
|
"qdbm_a.lib"
|
||||||
|
],
|
||||||
|
"headers-windows": [
|
||||||
|
"depot.h"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"readline": {
|
"readline": {
|
||||||
|
|||||||
@@ -552,8 +552,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"qdbm": {
|
"qdbm": {
|
||||||
"type": "url",
|
"type": "git",
|
||||||
"url": "https://master.dl.sourceforge.net/project/qdbm/qdbm/1.8.77/qdbm-1.8.77.tar.gz",
|
"url": "https://github.com/static-php/qdbm.git",
|
||||||
|
"rev": "main",
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "COPYING"
|
"path": "COPYING"
|
||||||
|
|||||||
@@ -15,4 +15,10 @@ class dba extends Extension
|
|||||||
$qdbm = $this->builder->getLib('qdbm') ? (' --with-qdbm=' . BUILD_ROOT_PATH) : '';
|
$qdbm = $this->builder->getLib('qdbm') ? (' --with-qdbm=' . BUILD_ROOT_PATH) : '';
|
||||||
return '--enable-dba' . $qdbm;
|
return '--enable-dba' . $qdbm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getWindowsConfigureArg(): string
|
||||||
|
{
|
||||||
|
$qdbm = $this->builder->getLib('qdbm') ? ' --with-qdbm' : '';
|
||||||
|
return '--with-dba' . $qdbm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ class WindowsBuilder extends BuilderBase
|
|||||||
|
|
||||||
// make cmake toolchain
|
// make cmake toolchain
|
||||||
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile();
|
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile();
|
||||||
|
|
||||||
|
f_mkdir(BUILD_INCLUDE_PATH, recursive: true);
|
||||||
|
f_mkdir(BUILD_LIB_PATH, recursive: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
24
src/SPC/builder/windows/library/qdbm.php
Normal file
24
src/SPC/builder/windows/library/qdbm.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace SPC\builder\windows\library;
|
||||||
|
|
||||||
|
use SPC\store\FileSystem;
|
||||||
|
|
||||||
|
class qdbm extends WindowsLibraryBase
|
||||||
|
{
|
||||||
|
public const NAME = 'qdbm';
|
||||||
|
|
||||||
|
protected function build(): void
|
||||||
|
{
|
||||||
|
cmd()->cd($this->source_dir)
|
||||||
|
->execWithWrapper(
|
||||||
|
$this->builder->makeSimpleWrapper('nmake'),
|
||||||
|
'/f VCMakefile'
|
||||||
|
);
|
||||||
|
copy($this->source_dir . '\qdbm_a.lib', BUILD_LIB_PATH . '\qdbm_a.lib');
|
||||||
|
copy($this->source_dir . '\depot.h', BUILD_INCLUDE_PATH . '\depot.h');
|
||||||
|
// FileSystem::copyDir($this->source_dir . '\include\curl', BUILD_INCLUDE_PATH . '\curl');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,13 +14,13 @@ declare(strict_types=1);
|
|||||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||||
$extensions = match (PHP_OS_FAMILY) {
|
$extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'dba',
|
'Linux', 'Darwin' => 'dba',
|
||||||
'Windows' => 'mbstring,pdo_sqlite,mbregex',
|
'Windows' => 'mbstring,pdo_sqlite,mbregex,dba',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
||||||
$with_libs = match (PHP_OS_FAMILY) {
|
$with_libs = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'qdbm',
|
'Linux', 'Darwin' => 'qdbm',
|
||||||
'Windows' => '',
|
'Windows' => 'qdbm',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Please change your test base combination. We recommend testing with `common`.
|
// Please change your test base combination. We recommend testing with `common`.
|
||||||
|
|||||||
Reference in New Issue
Block a user