mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 23:05:41 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2b2af774c | ||
|
|
a78e6fa5f8 | ||
|
|
5d9e4e2c81 | ||
|
|
eb97711347 | ||
|
|
5c8ec7a56d | ||
|
|
e85cd55dba | ||
|
|
f9f4ca9a01 | ||
|
|
99a512c4a4 | ||
|
|
75856e361e |
@@ -333,10 +333,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ext-zstd": {
|
"ext-zstd": {
|
||||||
"type": "git",
|
"type": "ghtagtar",
|
||||||
|
"repo": "kjdev/php-ext-zstd",
|
||||||
"path": "php-src/ext/zstd",
|
"path": "php-src/ext/zstd",
|
||||||
"rev": "master",
|
|
||||||
"url": "https://github.com/kjdev/php-ext-zstd",
|
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "LICENSE"
|
"path": "LICENSE"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class password_argon2 extends Extension
|
|||||||
|
|
||||||
public function getConfigureArg(bool $shared = false): string
|
public function getConfigureArg(bool $shared = false): string
|
||||||
{
|
{
|
||||||
if ($this->builder->getLib('openssl') !== null) {
|
if ($this->builder->getExt('openssl')?->isBuildStatic() || $this->isBuildShared()) {
|
||||||
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
|
if ($this->builder->getPHPVersionID() >= 80500 || ($this->builder->getPHPVersionID() >= 80400 && !$this->builder->getOption('enable-zts'))) {
|
||||||
return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead
|
return '--without-password-argon2'; // use --with-openssl-argon2 in openssl extension instead
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace SPC\builder\extension;
|
|||||||
use SPC\builder\Extension;
|
use SPC\builder\Extension;
|
||||||
use SPC\store\SourcePatcher;
|
use SPC\store\SourcePatcher;
|
||||||
use SPC\util\CustomExt;
|
use SPC\util\CustomExt;
|
||||||
use SPC\util\GlobalEnvManager;
|
|
||||||
|
|
||||||
#[CustomExt('xlswriter')]
|
#[CustomExt('xlswriter')]
|
||||||
class xlswriter extends Extension
|
class xlswriter extends Extension
|
||||||
@@ -29,13 +28,6 @@ class xlswriter extends Extension
|
|||||||
public function patchBeforeMake(): bool
|
public function patchBeforeMake(): bool
|
||||||
{
|
{
|
||||||
$patched = parent::patchBeforeMake();
|
$patched = parent::patchBeforeMake();
|
||||||
|
|
||||||
// Remove when https://github.com/viest/php-ext-xlswriter/pull/560 is merged
|
|
||||||
if (PHP_OS_FAMILY !== 'Windows') {
|
|
||||||
GlobalEnvManager::putenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS=' . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS') . ' -std=gnu17');
|
|
||||||
$patched = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PHP_OS_FAMILY === 'Windows') {
|
if (PHP_OS_FAMILY === 'Windows') {
|
||||||
// fix windows build with openssl extension duplicate symbol bug
|
// fix windows build with openssl extension duplicate symbol bug
|
||||||
SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir);
|
SourcePatcher::patchFile('spc_fix_xlswriter_win32.patch', $this->source_dir);
|
||||||
@@ -48,10 +40,4 @@ class xlswriter extends Extension
|
|||||||
}
|
}
|
||||||
return $patched;
|
return $patched;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove when https://github.com/viest/php-ext-xlswriter/pull/560 is merged
|
|
||||||
protected function getExtraEnv(): array
|
|
||||||
{
|
|
||||||
return ['CFLAGS' => '-std=gnu17'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,28 @@ trait libheif
|
|||||||
{
|
{
|
||||||
public function patchBeforeBuild(): bool
|
public function patchBeforeBuild(): bool
|
||||||
{
|
{
|
||||||
|
$patched = false;
|
||||||
if (!str_contains(file_get_contents($this->source_dir . '/CMakeLists.txt'), 'libbrotlienc')) {
|
if (!str_contains(file_get_contents($this->source_dir . '/CMakeLists.txt'), 'libbrotlienc')) {
|
||||||
FileSystem::replaceFileStr(
|
FileSystem::replaceFileStr(
|
||||||
$this->source_dir . '/CMakeLists.txt',
|
$this->source_dir . '/CMakeLists.txt',
|
||||||
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")',
|
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")',
|
||||||
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")' . "\n" . ' list(APPEND REQUIRES_PRIVATE "libbrotlienc")'
|
'list(APPEND REQUIRES_PRIVATE "libbrotlidec")' . "\n" . ' list(APPEND REQUIRES_PRIVATE "libbrotlienc")'
|
||||||
);
|
);
|
||||||
return true;
|
$patched = true;
|
||||||
}
|
}
|
||||||
return false;
|
// libheif 1.22+ ships a C-incompatible header: `struct heif_bad_pixel`
|
||||||
|
$heif_properties = $this->source_dir . '/libheif/api/libheif/heif_properties.h';
|
||||||
|
if (file_exists($heif_properties)
|
||||||
|
&& str_contains(file_get_contents($heif_properties), 'struct heif_bad_pixel { uint32_t row; uint32_t column; };')
|
||||||
|
) {
|
||||||
|
FileSystem::replaceFileStr(
|
||||||
|
$heif_properties,
|
||||||
|
'struct heif_bad_pixel { uint32_t row; uint32_t column; };',
|
||||||
|
'typedef struct heif_bad_pixel { uint32_t row; uint32_t column; } heif_bad_pixel;'
|
||||||
|
);
|
||||||
|
$patched = true;
|
||||||
|
}
|
||||||
|
return $patched;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user