mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
Merge branch 'v3' into feat/pgo-v3
This commit is contained in:
@@ -4,5 +4,5 @@ ncurses:
|
|||||||
- COPYING
|
- COPYING
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/pub/gnu/ncurses/'
|
url: 'https://ftpmirror.gnu.org/gnu/ncurses/'
|
||||||
regex: '/href="(?<file>ncurses-(?<version>[^"]+)\.tar\.gz)"/'
|
regex: '/href="(?<file>ncurses-(?<version>[^"]+)\.tar\.gz)"/'
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ AR=${SPC_DEFAULT_AR}
|
|||||||
RANLIB=${SPC_DEFAULT_RANLIB}
|
RANLIB=${SPC_DEFAULT_RANLIB}
|
||||||
LD=${SPC_DEFAULT_LD}
|
LD=${SPC_DEFAULT_LD}
|
||||||
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
|
||||||
SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-plt -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
|
SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
|
||||||
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
|
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
|
||||||
SPC_DEFAULT_LDFLAGS="-Wl,-dead_strip"
|
SPC_DEFAULT_LDFLAGS="-Wl,-dead_strip"
|
||||||
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
|
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ gettext:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/pub/gnu/gettext/'
|
url: 'https://ftpmirror.gnu.org/gnu/gettext/'
|
||||||
regex: '/href="(?<file>gettext-(?<version>[^"]+)\.tar\.xz)"/'
|
regex: '/href="(?<file>gettext-(?<version>[^"]+)\.tar\.xz)"/'
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [gettext-runtime/intl/COPYING.LIB]
|
license-files: [gettext-runtime/intl/COPYING.LIB]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ gmp:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/gnu/gmp/'
|
url: 'https://ftpmirror.gnu.org/gnu/gmp/'
|
||||||
regex: '/href="(?<file>gmp-(?<version>[^"]+)\.tar\.xz)"/'
|
regex: '/href="(?<file>gmp-(?<version>[^"]+)\.tar\.xz)"/'
|
||||||
source-mirror:
|
source-mirror:
|
||||||
type: url
|
type: url
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ idn2:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/gnu/libidn/'
|
url: 'https://ftpmirror.gnu.org/gnu/libidn/'
|
||||||
regex: '/href="(?<file>libidn2-(?<version>[^"]+)\.tar\.gz)"/'
|
regex: '/href="(?<file>libidn2-(?<version>[^"]+)\.tar\.gz)"/'
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [COPYING.LESSERv3]
|
license-files: [COPYING.LESSERv3]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ libiconv:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/gnu/libiconv/'
|
url: 'https://ftpmirror.gnu.org/gnu/libiconv/'
|
||||||
regex: '/href="(?<file>libiconv-(?<version>[^"]+)\.tar\.gz)"/'
|
regex: '/href="(?<file>libiconv-(?<version>[^"]+)\.tar\.gz)"/'
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [COPYING.LIB]
|
license-files: [COPYING.LIB]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ libunistring:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/gnu/libunistring/'
|
url: 'https://ftpmirror.gnu.org/gnu/libunistring/'
|
||||||
regex: '/href="(?<file>libunistring-(?<version>[^"]+)\.tar\.gz)"/'
|
regex: '/href="(?<file>libunistring-(?<version>[^"]+)\.tar\.gz)"/'
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [COPYING.LIB]
|
license-files: [COPYING.LIB]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ readline:
|
|||||||
artifact:
|
artifact:
|
||||||
source:
|
source:
|
||||||
type: filelist
|
type: filelist
|
||||||
url: 'https://ftp.gnu.org/pub/gnu/readline/'
|
url: 'https://ftpmirror.gnu.org/gnu/readline/'
|
||||||
regex: '/href="(?<file>readline-(?<version>[^"]+)\.tar\.gz)"/'
|
regex: '/href="(?<file>readline-(?<version>[^"]+)\.tar\.gz)"/'
|
||||||
metadata:
|
metadata:
|
||||||
license-files: [COPYING]
|
license-files: [COPYING]
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ class Artifact
|
|||||||
public function getSourceRoot(): string
|
public function getSourceRoot(): string
|
||||||
{
|
{
|
||||||
if (isset($this->config['metadata']['source-root'])) {
|
if (isset($this->config['metadata']['source-root'])) {
|
||||||
return $this->getSourceDir() . '/' . ltrim($this->config['metadata']['source-root'], '/');
|
return FileSystem::convertPath($this->getSourceDir() . '/' . ltrim($this->config['metadata']['source-root'], '/'));
|
||||||
}
|
}
|
||||||
return $this->getSourceDir();
|
return $this->getSourceDir();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ class ArtifactCache
|
|||||||
public function getCacheFullPath(array $cache_info): string
|
public function getCacheFullPath(array $cache_info): string
|
||||||
{
|
{
|
||||||
return match ($cache_info['cache_type']) {
|
return match ($cache_info['cache_type']) {
|
||||||
'archive', 'file' => DOWNLOAD_PATH . '/' . $cache_info['filename'],
|
'archive', 'file' => FileSystem::convertPath(DOWNLOAD_PATH . '/' . $cache_info['filename']),
|
||||||
'git' => DOWNLOAD_PATH . '/' . $cache_info['dirname'],
|
'git' => FileSystem::convertPath(DOWNLOAD_PATH . '/' . $cache_info['dirname']),
|
||||||
'local' => $cache_info['dirname'], // local dirname is absolute path
|
'local' => $cache_info['dirname'], // local dirname is absolute path
|
||||||
default => throw new SPCInternalException("Unknown cache type: {$cache_info['cache_type']}"),
|
default => throw new SPCInternalException("Unknown cache type: {$cache_info['cache_type']}"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ class WindowsUtil
|
|||||||
}
|
}
|
||||||
$args = [
|
$args = [
|
||||||
'-latest',
|
'-latest',
|
||||||
|
'-products', '*',
|
||||||
'-format', 'json',
|
'-format', 'json',
|
||||||
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -254,11 +254,16 @@ class ArtifactTest extends TestCase
|
|||||||
ApplicationContext::initialize();
|
ApplicationContext::initialize();
|
||||||
ApplicationContext::set(ArtifactCache::class, $cache);
|
ApplicationContext::set(ArtifactCache::class, $cache);
|
||||||
|
|
||||||
|
// Use a platform-appropriate absolute path: a Unix-style /tmp/... isn't
|
||||||
|
// absolute on Windows (no drive letter), so the test would otherwise
|
||||||
|
// fall through into the SOURCE_PATH-prefixed branch on Windows.
|
||||||
|
$extract = DIRECTORY_SEPARATOR === '\\' ? 'C:\tmp\my-pkg-extract' : '/tmp/my-pkg-extract';
|
||||||
|
|
||||||
$artifact = new Artifact('my-pkg', [
|
$artifact = new Artifact('my-pkg', [
|
||||||
'source' => ['type' => 'url', 'url' => 'https://example.com/file.tar.gz', 'extract' => '/tmp/my-pkg-extract'],
|
'source' => ['type' => 'url', 'url' => 'https://example.com/file.tar.gz', 'extract' => $extract],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$expected = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, '/tmp/my-pkg-extract');
|
$expected = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $extract);
|
||||||
$this->assertSame($expected, $artifact->getSourceDir());
|
$this->assertSame($expected, $artifact->getSourceDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,11 +708,7 @@ class ArtifactTest extends TestCase
|
|||||||
'Windows' => 'windows',
|
'Windows' => 'windows',
|
||||||
default => 'linux',
|
default => 'linux',
|
||||||
};
|
};
|
||||||
$arch = php_uname('m');
|
return "{$os}-" . arch2gnu(php_uname('m'));
|
||||||
if ($arch === 'arm64') {
|
|
||||||
$arch = 'aarch64';
|
|
||||||
}
|
|
||||||
return "{$os}-{$arch}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function injectArtifactConfig(string $name, array $config): void
|
private function injectArtifactConfig(string $name, array $config): void
|
||||||
|
|||||||
Reference in New Issue
Block a user