mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Fix gmssl and openssl duplicate symbol (#632)
* Fix gmssl and openssl duplicate symbol * Add tests
This commit is contained in:
parent
21265cd561
commit
c6d4934dd6
@ -261,6 +261,7 @@
|
||||
"gmssl": {
|
||||
"type": "ghtar",
|
||||
"repo": "guanzhi/GmSSL",
|
||||
"provide-pre-built": true,
|
||||
"license": {
|
||||
"type": "file",
|
||||
"path": "LICENSE"
|
||||
|
||||
@ -30,6 +30,7 @@ class SourcePatcher
|
||||
FileSystem::addSourceExtractHook('ext-imagick', [SourcePatcher::class, 'patchImagickWith84']);
|
||||
FileSystem::addSourceExtractHook('libaom', [SourcePatcher::class, 'patchLibaomForAlpine']);
|
||||
FileSystem::addSourceExtractHook('attr', [SourcePatcher::class, 'patchAttrForAlpine']);
|
||||
FileSystem::addSourceExtractHook('gmssl', [SourcePatcher::class, 'patchGMSSL']);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -541,4 +542,10 @@ class SourcePatcher
|
||||
rename(SOURCE_PATH . '\php-src\sapi\micro\php_micro.c.win32bak', SOURCE_PATH . '\php-src\sapi\micro\php_micro.c');
|
||||
}
|
||||
}
|
||||
|
||||
public static function patchGMSSL(): void
|
||||
{
|
||||
FileSystem::replaceFileStr(SOURCE_PATH . '/gmssl/src/hex.c', 'unsigned char *OPENSSL_hexstr2buf(const char *str, size_t *len)', 'unsigned char *GMSSL_hexstr2buf(const char *str, size_t *len)');
|
||||
FileSystem::replaceFileStr(SOURCE_PATH . '/gmssl/src/hex.c', 'OPENSSL_hexchar2int', 'GMSSL_hexchar2int');
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ $test_os = [
|
||||
];
|
||||
|
||||
// whether enable thread safe
|
||||
$zts = true;
|
||||
$zts = false;
|
||||
|
||||
$no_strip = false;
|
||||
|
||||
@ -40,7 +40,7 @@ $prefer_pre_built = false;
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,ftp,gd,gmp,gettext,iconv,igbinary,imagick,intl,ldap,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,parallel,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,phar,posix,protobuf,readline,redis,session,shmop,simplexml,soap,sockets,sodium,sqlite3,ssh2,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,xlswriter,xml,xmlreader,xmlwriter,zip,zlib,yaml,zstd',
|
||||
'Linux', 'Darwin' => 'openssl,gmssl',
|
||||
'Windows' => 'gettext',
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user