mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-17 05:45:35 +08:00
Compare commits
9 Commits
f1a9a28ed7
...
4fb4e42896
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fb4e42896 | ||
|
|
81e7a0c554 | ||
|
|
4cbe4ea82d | ||
|
|
ea4905cd0d | ||
|
|
3c09ba59d7 | ||
|
|
430f436b79 | ||
|
|
93001dce88 | ||
|
|
2d6d25cadf | ||
|
|
b644da8210 |
@@ -5,23 +5,11 @@ declare(strict_types=1);
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\store\FileSystem;
|
||||
use SPC\util\CustomExt;
|
||||
|
||||
#[CustomExt('openssl')]
|
||||
class openssl extends Extension
|
||||
{
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
// Fix php 8.5 alpha1~4 zts openssl build bug
|
||||
FileSystem::replaceFileStr(
|
||||
SOURCE_PATH . '/php-src/ext/openssl/config.w32',
|
||||
'WARNING("OpenSSL argon2 hashing not supported in ZTS mode for now");',
|
||||
'AC_DEFINE("HAVE_OPENSSL_ARGON2", 1, "Define to 1 to enable OpenSSL argon2 password hashing.");'
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
$patched = parent::patchBeforeMake();
|
||||
@@ -40,7 +28,7 @@ class openssl extends Extension
|
||||
{
|
||||
$openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH;
|
||||
$args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir;
|
||||
if ($this->builder->getPHPVersionID() >= 80500) {
|
||||
if ($this->builder->getPHPVersionID() >= 80500 || !$this->builder->getOption('enable-zts')) {
|
||||
$args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"';
|
||||
}
|
||||
return $args;
|
||||
|
||||
@@ -359,7 +359,6 @@ class LinuxBuilder extends UnixBuilderBase
|
||||
$static = SPCTarget::isStatic() ? '-all-static' : '';
|
||||
$lib = BUILD_LIB_PATH;
|
||||
return [
|
||||
// 'CPPFLAGS' => '-Dsomethinghere',
|
||||
'EXTRA_CFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'),
|
||||
'EXTRA_LIBS' => $config['libs'],
|
||||
'EXTRA_LDFLAGS' => getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'),
|
||||
|
||||
Reference in New Issue
Block a user