mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 06:45:39 +08:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d411fac9a1 | ||
|
|
ddb9e3e7e4 | ||
|
|
fef361225a | ||
|
|
0b2b1d51e1 | ||
|
|
820d77b8b2 | ||
|
|
cd3eb3d41d | ||
|
|
fb8f8d4ef8 | ||
|
|
1a476d0e80 | ||
|
|
e5ad72214c | ||
|
|
c339b900f8 | ||
|
|
3ded9881e1 | ||
|
|
08a6bf38a4 | ||
|
|
cae668a947 | ||
|
|
e592488d7a | ||
|
|
a7184d0411 | ||
|
|
d535e4f102 |
@@ -63,7 +63,8 @@
|
|||||||
],
|
],
|
||||||
"ext-depends-windows": [
|
"ext-depends-windows": [
|
||||||
"zlib",
|
"zlib",
|
||||||
"openssl"
|
"openssl",
|
||||||
|
"brotli"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dba": {
|
"dba": {
|
||||||
|
|||||||
@@ -109,8 +109,7 @@
|
|||||||
"krb5"
|
"krb5"
|
||||||
],
|
],
|
||||||
"lib-suggests-windows": [
|
"lib-suggests-windows": [
|
||||||
"brotli",
|
"brotli"
|
||||||
"zstd"
|
|
||||||
],
|
],
|
||||||
"frameworks": [
|
"frameworks": [
|
||||||
"CoreFoundation",
|
"CoreFoundation",
|
||||||
@@ -763,7 +762,6 @@
|
|||||||
"xz"
|
"xz"
|
||||||
],
|
],
|
||||||
"lib-suggests-windows": [
|
"lib-suggests-windows": [
|
||||||
"zstd",
|
|
||||||
"openssl"
|
"openssl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1000,6 +998,9 @@
|
|||||||
],
|
],
|
||||||
"headers": [
|
"headers": [
|
||||||
"wtr/watcher-c.h"
|
"wtr/watcher-c.h"
|
||||||
|
],
|
||||||
|
"frameworks": [
|
||||||
|
"CoreServices"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xz": {
|
"xz": {
|
||||||
|
|||||||
@@ -33,4 +33,14 @@ class sqlsrv extends Extension
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function patchBeforeMake(): bool
|
||||||
|
{
|
||||||
|
$makefile = SOURCE_PATH . '/php-src/Makefile';
|
||||||
|
$makeContent = file_get_contents($makefile);
|
||||||
|
$makeContent = preg_replace('/^(CFLAGS_(?:PDO_)?SQLSRV=.*?)\s+\/W4\b/m', '$1', $makeContent);
|
||||||
|
$makeContent = preg_replace('/^(CFLAGS_(?:PDO_)?SQLSRV=.*?)\s+\/WX\b/m', '$1', $makeContent);
|
||||||
|
file_put_contents($makefile, $makeContent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class libjpeg extends WindowsLibraryBase
|
|||||||
'-DENABLE_STATIC=ON ' .
|
'-DENABLE_STATIC=ON ' .
|
||||||
'-DBUILD_TESTING=OFF ' .
|
'-DBUILD_TESTING=OFF ' .
|
||||||
'-DWITH_JAVA=OFF ' .
|
'-DWITH_JAVA=OFF ' .
|
||||||
|
'-DWITH_SIMD=OFF ' .
|
||||||
'-DWITH_CRT_DLL=OFF ' .
|
'-DWITH_CRT_DLL=OFF ' .
|
||||||
"-DENABLE_ZLIB_COMPRESSION={$zlib} " .
|
"-DENABLE_ZLIB_COMPRESSION={$zlib} " .
|
||||||
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ class ngtcp2 extends WindowsLibraryBase
|
|||||||
'-DBUILD_SHARED_LIBS=OFF ' .
|
'-DBUILD_SHARED_LIBS=OFF ' .
|
||||||
'-DENABLE_STATIC_CRT=ON ' .
|
'-DENABLE_STATIC_CRT=ON ' .
|
||||||
'-DENABLE_LIB_ONLY=ON ' .
|
'-DENABLE_LIB_ONLY=ON ' .
|
||||||
|
'-DENABLE_OPENSSL=OFF ' .
|
||||||
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
||||||
)
|
)
|
||||||
->execWithWrapper(
|
->execWithWrapper(
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class FileSystem
|
|||||||
$src_path = FileSystem::convertPath($from);
|
$src_path = FileSystem::convertPath($from);
|
||||||
switch (PHP_OS_FAMILY) {
|
switch (PHP_OS_FAMILY) {
|
||||||
case 'Windows':
|
case 'Windows':
|
||||||
f_passthru('xcopy "' . $src_path . '" "' . $dst_path . '" /s/e/v/y/i');
|
f_passthru('xcopy "' . $src_path . '" "' . $dst_path . '" /s/e/y/i');
|
||||||
break;
|
break;
|
||||||
case 'Linux':
|
case 'Linux':
|
||||||
case 'Darwin':
|
case 'Darwin':
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ if (file_exists('/etc/ssl/openssl.cnf')) {
|
|||||||
}
|
}
|
||||||
assert($valid);
|
assert($valid);
|
||||||
}
|
}
|
||||||
if (PHP_VERSION_ID >= 80500 && defined('OPENSSL_VERSION_NUMBER') && OPENSSL_VERSION_NUMBER >= 0x30200000) {
|
if (PHP_VERSION_ID >= 80500 && (!PHP_ZTS || PHP_OS_FAMILY !== 'Windows') && defined('OPENSSL_VERSION_NUMBER') && OPENSSL_VERSION_NUMBER >= 0x30200000) {
|
||||||
assert(function_exists('openssl_password_hash'));
|
assert(function_exists('openssl_password_hash'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,22 +16,22 @@ $test_php_version = [
|
|||||||
// '8.1',
|
// '8.1',
|
||||||
// '8.2',
|
// '8.2',
|
||||||
// '8.3',
|
// '8.3',
|
||||||
'8.4',
|
// '8.4',
|
||||||
'8.5',
|
'8.5',
|
||||||
// 'git',
|
// 'git',
|
||||||
];
|
];
|
||||||
|
|
||||||
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
|
// test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
// 'macos-15-intel', // bin/spc for x86_64
|
'macos-15-intel', // bin/spc for x86_64
|
||||||
'macos-15', // bin/spc for arm64
|
'macos-15', // bin/spc for arm64
|
||||||
'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
|
||||||
'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
|
||||||
// 'ubuntu-24.04', // bin/spc for x86_64
|
// 'ubuntu-24.04', // bin/spc for x86_64
|
||||||
'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
|
||||||
// 'ubuntu-24.04-arm', // bin/spc for arm64
|
// 'ubuntu-24.04-arm', // bin/spc for arm64
|
||||||
// 'windows-2022', // .\bin\spc.ps1
|
// 'windows-2022', // .\bin\spc.ps1
|
||||||
'windows-2025',
|
// 'windows-2025',
|
||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
@@ -43,15 +43,15 @@ $no_strip = false;
|
|||||||
$upx = false;
|
$upx = false;
|
||||||
|
|
||||||
// whether to test frankenphp build, only available for macOS and linux
|
// whether to test frankenphp build, only available for macOS and linux
|
||||||
$frankenphp = false;
|
$frankenphp = true;
|
||||||
|
|
||||||
// prefer downloading pre-built packages to speed up the build process
|
// prefer downloading pre-built packages to speed up the build process
|
||||||
$prefer_pre_built = false;
|
$prefer_pre_built = false;
|
||||||
|
|
||||||
// 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' => 'zlib',
|
'Linux', 'Darwin' => 'sqlsrv,pdo_sqlsrv',
|
||||||
'Windows' => 'gd,zlib,mbstring,filter',
|
'Windows' => 'amqp,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,ds,exif,ffi,fileinfo,filter,ftp,gd,iconv,igbinary,libxml,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_sqlite,pdo_sqlsrv,phar,rar,redis,session,shmop,simdjson,simplexml,soap,sockets,sqlite3,sqlsrv,ssh2,sysvshm,tokenizer,xml,xmlreader,xmlwriter,yac,yaml,zip,zlib',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
|
||||||
@@ -66,7 +66,7 @@ $with_suggested_libs = true;
|
|||||||
|
|
||||||
// If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true.
|
// If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true.
|
||||||
$with_libs = match (PHP_OS_FAMILY) {
|
$with_libs = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'libjpeg',
|
'Linux', 'Darwin' => '',
|
||||||
'Windows' => '',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user