Use zig toolchain by default, lint files

This commit is contained in:
crazywhalecc
2026-02-03 14:01:41 +08:00
parent 6fdbf629dc
commit 38f742156d
20 changed files with 373 additions and 365 deletions

View File

@@ -83,7 +83,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
; - gnu-native: used for general linux distros, can build gnu target for the installed glibc version only.
; option to specify the target, superceded by SPC_TARGET if set
SPC_LIBC=musl
; SPC_LIBC=musl
; uncomment to link libc dynamically on musl
; SPC_MUSL_DYNAMIC=true
@@ -94,13 +94,13 @@ SPC_LIBC=musl
; `native-native` - links against system libc dynamically
; `native-native-musl` - links against musl libc statically
; `native-native-musl -dynamic` - links against musl libc dynamically
; SPC_TARGET=
SPC_TARGET=native-native-musl
; compiler environments
CC=${SPC_LINUX_DEFAULT_CC}
CXX=${SPC_LINUX_DEFAULT_CXX}
AR=${SPC_LINUX_DEFAULT_AR}
LD=${SPC_LINUX_DEFAULT_LD}
; compiler environments (default value is defined by selected toolchain)
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
@@ -132,11 +132,11 @@ OPENSSLDIR=""
; build target: macho or macho (possibly we could support macho-universal in the future)
; Currently we do not support universal and cross-compilation for macOS.
SPC_TARGET=native-macos
; compiler environments
CC=clang
CXX=clang++
AR=ar
LD=ld
; compiler environments (default value is defined by selected toolchain)
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
{
"frankenphp": {
"type": "virtual-target",
"artifact": "frankenphp",
"depends": [
"php-embed",
@@ -9,90 +10,78 @@
"php-embed",
"go-xcaddy",
"libxml2"
],
"type": "virtual-target"
]
},
"go-xcaddy": {
"type": "target",
"artifact": "go-xcaddy",
"static-bins": [
"xcaddy"
],
"type": "target"
]
},
"musl-toolchain": {
"artifact": "musl-toolchain",
"type": "target"
"type": "target",
"artifact": "musl-toolchain"
},
"nasm": {
"artifact": "nasm",
"type": "target"
"type": "target",
"artifact": "nasm"
},
"php": {
"type": "target",
"artifact": "php-src",
"depends@macos": [
"libxml2"
],
"type": "target"
]
},
"php-cgi": {
"type": "virtual-target",
"depends": [
"php"
],
"type": "virtual-target"
]
},
"php-cli": {
"type": "virtual-target",
"depends": [
"php"
],
"type": "virtual-target"
]
},
"php-embed": {
"type": "virtual-target",
"depends": [
"php"
],
"type": "virtual-target"
]
},
"php-fpm": {
"type": "virtual-target",
"depends": [
"php"
],
"type": "virtual-target"
]
},
"php-micro": {
"type": "virtual-target",
"artifact": "micro",
"depends": [
"php"
],
"type": "virtual-target"
]
},
"php-sdk-binary-tools": {
"artifact": "php-sdk-binary-tools",
"type": "target"
},
"pkg-config": {
"artifact": "pkg-config",
"static-bins": [
"pkg-config"
],
"type": "target"
"type": "target",
"artifact": "php-sdk-binary-tools"
},
"strawberry-perl": {
"artifact": "strawberry-perl",
"type": "target"
"type": "target",
"artifact": "strawberry-perl"
},
"upx": {
"artifact": "upx",
"type": "target"
"type": "target",
"artifact": "upx"
},
"vswhere": {
"type": "target",
"artifact": "vswhere",
"static-bins@windows": [
"vswhere.exe"
],
"type": "target"
},
"zig": {
"artifact": "zig",
"type": "target"
]
}
}

View File

@@ -4,15 +4,11 @@ curl:
source:
type: ghrel
repo: curl/curl
match: 'curl.+\.tar\.xz'
match: curl.+\.tar\.xz
prefer-stable: true
metadata:
license-files: [COPYING]
license: curl
static-libs@unix:
- libcurl.a
headers:
- curl
depends@unix:
- openssl
- zlib
@@ -31,3 +27,7 @@ curl:
- CoreFoundation
- CoreServices
- SystemConfiguration
headers:
- curl
static-libs@unix:
- libcurl.a

View File

@@ -10,10 +10,10 @@ gettext:
license: LGPL-2.1-or-later
depends:
- libiconv
suggests:
- ncurses
- libxml2
frameworks:
- CoreFoundation
static-libs@unix:
- libintl.a
suggests:
- ncurses
- libxml2

View File

@@ -11,11 +11,11 @@ idn2:
depends@macos:
- libiconv
- gettext
headers:
- idn2.h
pkg-configs:
- libidn2
suggests@unix:
- libiconv
- gettext
- libunistring
headers:
- idn2.h
pkg-configs:
- libidn2

View File

@@ -11,6 +11,9 @@ krb5:
source-root: src
depends:
- openssl
suggests:
- ldap
- libedit
frameworks:
- Kerberos
headers:
@@ -18,6 +21,3 @@ krb5:
- gssapi/gssapi.h
pkg-configs:
- krb5-gssapi
suggests:
- ldap
- libedit

View File

@@ -10,10 +10,10 @@ libxml2:
license: MIT
depends@unix:
- libiconv
suggests@unix:
- xz
- zlib
headers:
- libxml2
pkg-configs:
- libxml-2.0
suggests@unix:
- xz
- zlib

View File

@@ -11,14 +11,14 @@ nghttp2:
depends:
- zlib
- openssl
suggests:
- libxml2
- nghttp3
- ngtcp2
- brotli
headers:
- nghttp2
pkg-configs:
- libnghttp2
static-libs@unix:
- libnghttp2.a
suggests:
- libxml2
- nghttp3
- ngtcp2
- brotli

View File

@@ -11,6 +11,9 @@ ngtcp2:
license: MIT
depends:
- openssl
suggests:
- nghttp3
- brotli
headers:
- ngtcp2
pkg-configs:
@@ -19,6 +22,3 @@ ngtcp2:
static-libs@unix:
- libngtcp2.a
- libngtcp2_crypto_ossl.a
suggests:
- nghttp3
- brotli

View File

@@ -0,0 +1,9 @@
pkg-config:
type: target
artifact:
source: 'https://dl.static-php.dev/static-php-cli/deps/pkg-config/pkg-config-0.29.2.tar.gz'
binary:
linux-x86_64: { type: ghrel, repo: static-php/static-php-cli-hosted, match: pkg-config-x86_64-linux-musl-1.2.5.txz, extract: { bin/pkg-config: '{pkg_root_path}/bin/pkg-config' } }
linux-aarch64: { type: ghrel, repo: static-php/static-php-cli-hosted, match: pkg-config-aarch64-linux-musl-1.2.5.txz, extract: { bin/pkg-config: '{pkg_root_path}/bin/pkg-config' } }
macos-x86_64: { type: ghrel, repo: static-php/static-php-cli-hosted, match: pkg-config-x86_64-darwin.txz, extract: { bin/pkg-config: '{pkg_root_path}/bin/pkg-config' } }
macos-aarch64: { type: ghrel, repo: static-php/static-php-cli-hosted, match: pkg-config-aarch64-darwin.txz, extract: { bin/pkg-config: '{pkg_root_path}/bin/pkg-config' } }

View File

@@ -0,0 +1,4 @@
zig:
type: target
artifact:
binary: custom