mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
use the upstream version
This commit is contained in:
parent
487c6da4ac
commit
25d7c72b6e
@ -1001,7 +1001,7 @@
|
||||
"spx": {
|
||||
"type": "git",
|
||||
"rev": "master",
|
||||
"url": "https://github.com/static-php/php-spx.git",
|
||||
"url": "https://github.com/NoiseByNorthwest/php-spx.git",
|
||||
"path": "php-src/ext/spx",
|
||||
"license": {
|
||||
"type": "file",
|
||||
|
||||
@ -13,7 +13,7 @@ class spx extends Extension
|
||||
{
|
||||
public function getUnixConfigureArg(bool $shared = false): string
|
||||
{
|
||||
$arg = '--enable-spx' . ($shared ? '=shared' : '');
|
||||
$arg = '--enable-SPX' . ($shared ? '=shared' : '');
|
||||
if ($this->builder->getLib('zlib') !== null) {
|
||||
$arg .= ' --with-zlib-dir=' . BUILD_ROOT_PATH;
|
||||
}
|
||||
@ -29,4 +29,20 @@ class spx extends Extension
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
FileSystem::replaceFileStr(
|
||||
$this->source_dir . '/config.m4',
|
||||
'CFLAGS="$CFLAGS -Werror -Wall -O3 -pthread -std=gnu90"',
|
||||
'CFLAGS="$CFLAGS -pthread"'
|
||||
);
|
||||
FileSystem::replaceFileStr(
|
||||
$this->source_dir . '/src/php_spx.h',
|
||||
"extern zend_module_entry spx_module_entry;\n",
|
||||
"extern zend_module_entry spx_module_entry;;\n#define phpext_spx_ptr &spx_module_entry\n"
|
||||
);
|
||||
FileSystem::copy($this->source_dir . '/src/php_spx.h', $this->source_dir . '/php_spx.h');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user