mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-14 04:15:35 +08:00
Fix postgresql macOS 15.4 build bug (#705)
This commit is contained in:
@@ -41,7 +41,8 @@ trait postgresql
|
|||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
||||||
if (!empty($output[1][0])) {
|
if (!empty($output[1][0])) {
|
||||||
$cppflags = $output[1][0];
|
$cppflags = $output[1][0];
|
||||||
$envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident\"";
|
$macos_15_bug_cflags = PHP_OS_FAMILY === 'Darwin' ? ' -Wno-unguarded-availability-new' : '';
|
||||||
|
$envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident{$macos_15_bug_cflags}\"";
|
||||||
}
|
}
|
||||||
$output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}");
|
$output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}");
|
||||||
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
|
||||||
|
|||||||
@@ -13,26 +13,27 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
// test php version (8.1 ~ 8.4 available, multiple for matrix)
|
// test php version (8.1 ~ 8.4 available, multiple for matrix)
|
||||||
$test_php_version = [
|
$test_php_version = [
|
||||||
'8.1',
|
// '8.1',
|
||||||
'8.2',
|
// '8.2',
|
||||||
'8.3',
|
// '8.3',
|
||||||
'8.4',
|
'8.4',
|
||||||
];
|
];
|
||||||
|
|
||||||
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
|
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
'macos-13',
|
// 'macos-13',
|
||||||
'macos-14',
|
'macos-14',
|
||||||
'ubuntu-latest',
|
'macos-15',
|
||||||
'ubuntu-22.04',
|
// 'ubuntu-latest',
|
||||||
'ubuntu-24.04',
|
// 'ubuntu-22.04',
|
||||||
'ubuntu-22.04-arm',
|
// 'ubuntu-24.04',
|
||||||
'ubuntu-24.04-arm',
|
// 'ubuntu-22.04-arm',
|
||||||
'windows-latest',
|
// 'ubuntu-24.04-arm',
|
||||||
|
// 'windows-latest',
|
||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
$zts = true;
|
$zts = false;
|
||||||
|
|
||||||
$no_strip = false;
|
$no_strip = false;
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ $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' => 'ev',
|
'Linux', 'Darwin' => 'pgsql',
|
||||||
'Windows' => 'ev',
|
'Windows' => 'ev',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,6 +151,7 @@ if ($shared_extensions) {
|
|||||||
break;
|
break;
|
||||||
case 'macos-13':
|
case 'macos-13':
|
||||||
case 'macos-14':
|
case 'macos-14':
|
||||||
|
case 'macos-15':
|
||||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
||||||
$no_strip = true;
|
$no_strip = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user