Compare commits

..

1 Commits
v3 ... docs/ga

Author SHA1 Message Date
crazywhalecc
1a6c044ee9 Add google analytics for docs 2025-11-04 09:45:25 +08:00
1049 changed files with 33644 additions and 49436 deletions

View File

@@ -1,12 +1,17 @@
## What does this PR do?
<!-- Please describe the changes made in this PR here. -->
## Checklist before merging
- If you modified `*.php` or `*.yml`, run them locally to ensure your changes are valid:
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
> If a modification is not involved, please skip it directly.
- If you modified `*.php` or `*.json`, run them locally to ensure your changes are valid:
- [ ] `composer cs-fix`
- [ ] `composer analyse`
- [ ] `composer test`
- [ ] `bin/spc dev:lint-config`
- [ ] `bin/spc dev:sort-config`
- If it's an extension or dependency update, please ensure the following:
- [ ] Add your test combination to `src/globals/test-extensions.php`.
- [ ] If adding new or fixing bugs, add commit message containing `extension test` or `test extensions` to trigger full test suite.

View File

@@ -29,9 +29,6 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
@@ -45,22 +42,10 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: Show full build logs
type: boolean
@@ -84,9 +69,6 @@ on:
description: Extensions to build (comma separated)
required: true
type: string
shared-extensions:
description: Shared extensions to build (optional, comma separated)
type: string
extra-libs:
description: Extra libraries to build (optional, comma separated)
type: string
@@ -100,22 +82,10 @@ on:
build-fpm:
description: Build fpm binary
type: boolean
build-frankenphp:
description: Build frankenphp binary (requires ZTS)
type: boolean
default: false
enable-zts:
description: Enable ZTS
type: boolean
default: false
prefer-pre-built:
description: Prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Include suggested libs
type: boolean
default: false
debug:
description: Show full build logs
type: boolean
@@ -174,19 +144,8 @@ jobs:
RUNS_ON="macos-15"
;;
esac
STATIC_EXTS="${{ inputs.extensions }}"
SHARED_EXTS="${{ inputs['shared-extensions'] }}"
BUILD_FRANKENPHP="${{ inputs['build-frankenphp'] }}"
ENABLE_ZTS="${{ inputs['enable-zts'] }}"
ALL_EXTS="$STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
ALL_EXTS="$ALL_EXTS,$SHARED_EXTS"
fi
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=$ALL_EXTS --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD $STATIC_EXTS"
if [ -n "$SHARED_EXTS" ]; then
BUILD_CMD="$BUILD_CMD --build-shared=$SHARED_EXTS"
fi
DOWN_CMD="$DOWN_CMD --with-php=${{ inputs.php-version }} --for-extensions=${{ inputs.extensions }} --ignore-cache-sources=php-src"
BUILD_CMD="$BUILD_CMD ${{ inputs.extensions }}"
if [ -n "${{ inputs.extra-libs }}" ]; then
DOWN_CMD="$DOWN_CMD --for-libs=${{ inputs.extra-libs }}"
BUILD_CMD="$BUILD_CMD --with-libs=${{ inputs.extra-libs }}"
@@ -198,9 +157,6 @@ jobs:
if [ ${{ inputs.prefer-pre-built }} == true ]; then
DOWN_CMD="$DOWN_CMD --prefer-pre-built"
fi
if [ ${{ inputs.with-suggested-libs }} == true ]; then
BUILD_CMD="$BUILD_CMD --with-suggested-libs"
fi
if [ ${{ inputs.build-cli }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-cli"
fi
@@ -210,12 +166,6 @@ jobs:
if [ ${{ inputs.build-fpm }} == true ]; then
BUILD_CMD="$BUILD_CMD --build-fpm"
fi
if [ "$BUILD_FRANKENPHP" = "true" ]; then
BUILD_CMD="$BUILD_CMD --build-frankenphp"
fi
if [ "$ENABLE_ZTS" = "true" ]; then
BUILD_CMD="$BUILD_CMD --enable-zts"
fi
echo 'download='"$DOWN_CMD" >> "$GITHUB_OUTPUT"
echo 'build='"$BUILD_CMD" >> "$GITHUB_OUTPUT"
echo 'run='"$RUNS_ON" >> "$GITHUB_OUTPUT"
@@ -238,27 +188,6 @@ jobs:
env:
phpts: nts
- if: ${{ inputs['build-frankenphp'] == true }}
name: "Install go-xcaddy for FrankenPHP"
run: |
case "${{ inputs.os }}" in
linux-x86_64|linux-aarch64)
./bin/spc-alpine-docker install-pkg go-xcaddy
;;
linux-x86_64-glibc|linux-aarch64-glibc)
./bin/spc-gnu-docker install-pkg go-xcaddy
;;
macos-x86_64|macos-aarch64)
composer update --no-dev --classmap-authoritative
./bin/spc doctor --auto-fix
./bin/spc install-pkg go-xcaddy
;;
*)
echo "Unsupported OS for go-xcaddy install: ${{ inputs.os }}"
exit 1
;;
esac
# Cache downloaded source
- id: cache-download
uses: actions/cache@v4
@@ -273,18 +202,10 @@ jobs:
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# Upload debug logs
- if: ${{ inputs.debug && failure() }}
name: "Upload build logs on failure"
uses: actions/upload-artifact@v7
with:
name: spc-logs-${{ inputs.php-version }}-${{ inputs.os }}
path: log/*.log
# Upload cli executable
- if: ${{ inputs.build-cli == true }}
name: "Upload PHP cli SAPI"
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: php-cli-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/php
@@ -292,7 +213,7 @@ jobs:
# Upload micro self-extracted executable
- if: ${{ inputs.build-micro == true }}
name: "Upload PHP micro SAPI"
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: php-micro-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/micro.sfx
@@ -300,33 +221,18 @@ jobs:
# Upload fpm executable
- if: ${{ inputs.build-fpm == true }}
name: "Upload PHP fpm SAPI"
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: php-fpm-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/php-fpm
# Upload frankenphp executable
- if: ${{ inputs['build-frankenphp'] == true }}
name: "Upload FrankenPHP SAPI"
uses: actions/upload-artifact@v7
with:
name: php-frankenphp-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/bin/frankenphp
# Upload extensions metadata
- if: ${{ inputs['shared-extensions'] != '' }}
name: "Upload shared extensions"
uses: actions/upload-artifact@v7
with:
name: php-shared-ext-${{ inputs.php-version }}-${{ inputs.os }}
path: |
buildroot/modules/*.so
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@v4
name: "Upload License Files"
with:
name: license-files-${{ inputs.php-version }}-${{ inputs.os }}
path: buildroot/license/
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@v4
name: "Upload Build Metadata"
with:
name: build-meta-${{ inputs.php-version }}-${{ inputs.os }}

View File

@@ -29,10 +29,6 @@ on:
description: prefer pre-built binaries (reduce build time)
type: boolean
default: true
with-suggested-libs:
description: Build with suggested libs
type: boolean
default: true
debug:
description: enable debug logs
type: boolean
@@ -94,24 +90,24 @@ jobs:
# Upload cli executable
- if: ${{ inputs.build-cli == true }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: php-${{ inputs.version }}
path: buildroot/bin/php.exe
# Upload micro self-extracted executable
- if: ${{ inputs.build-micro == true }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
name: micro-${{ inputs.version }}
path: buildroot/bin/micro.sfx
# Upload extensions metadata
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@v4
with:
name: license-files
path: buildroot/license/
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@v4
with:
name: build-meta
path: |

View File

@@ -2,9 +2,9 @@ name: Build SPC Binary
on:
push:
branches: [ "main", "v3" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "v3" ]
branches: [ "main" ]
paths:
- '.github/workflows/release-build.yml'
release:
@@ -38,12 +38,9 @@ jobs:
- name: "windows-x64"
os: "ubuntu-latest"
filename: "spc-windows-x64.exe"
permissions:
id-token: write
attestations: write
steps:
- name: "Checkout"
uses: "actions/checkout@v5"
uses: "actions/checkout@v4"
- if: inputs.debug == true
run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV
@@ -63,7 +60,7 @@ jobs:
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v5"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-${{ env.PHP_VERSION }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
@@ -104,16 +101,10 @@ jobs:
tar -czf ${{ matrix.operating-system.filename }} spc
# validate spc binary
if [ "${{ matrix.operating-system.name }}" == "linux-x86_64" ]; then
./spc dev:info php
./spc dev:extensions
fi
fi
- name: "Generate build provenance attestation"
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v4
with:
subject-path: "${{ github.workspace }}/${{ matrix.operating-system.name == 'windows-x64' && 'spc.exe' || 'spc' }}"
- name: "Copy file"
run: |
if [ "${{ matrix.operating-system.name }}" != "windows-x64" ]; then
@@ -129,44 +120,20 @@ jobs:
with:
files: dist/${{ matrix.operating-system.filename }}
- name: "Deploy to self-hosted OSS (nightly)"
# only run this step if the repository is static-php-cli and is push to v3 branch
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/v3' }}
- name: "Deploy to self-hosted OSS"
# only run this step if the repository is static-php-cli and the branch is main
if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: v3/spc-bin/nightly/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Deploy to self-hosted OSS (latest)"
# only run this step if the repository is static-php-cli and is release tag
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: v3/spc-bin/latest/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Deploy to self-hosted OSS (versioned)"
# only run this step if the repository is static-php-cli and is release tag
if: ${{ github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/') }}
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: v3/spc-bin/${{ github.ref_name }}/
destination_dir: static-php-cli/spc-bin/nightly/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Upload Artifact"
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v4
with:
path: spc${{ env.SUFFIX }}
name: spc-${{ matrix.operating-system.name }}${{ env.SUFFIX }}
@@ -189,10 +156,10 @@ jobs:
os: "windows-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: "Download Artifact"
uses: actions/download-artifact@v5
uses: actions/download-artifact@v4
env:
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
with:
@@ -205,4 +172,4 @@ jobs:
- name: "Run SPC Tests"
env:
SUFFIX: ${{ matrix.operating-system.name == 'windows-x64' && '.exe' || '' }}
run: ./spc${{ env.SUFFIX }} dev:info php
run: ./spc${{ env.SUFFIX }} dev:extensions

View File

@@ -1,9 +1,9 @@
name: v3 Tests
name: Tests
on:
pull_request:
branches: [ "v3" ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
branches: [ "main" ]
types: [ opened, synchronize, reopened ]
paths:
- 'src/**'
- 'config/**'
@@ -15,10 +15,6 @@ on:
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -107,171 +103,112 @@ jobs:
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: "Run PHPUnit Tests"
run: vendor/bin/phpunit tests/ --no-coverage
run: SPC_LIBC=glibc vendor/bin/phpunit tests/ --no-coverage
check-gate:
name: "Check: need-test label"
define-matrix:
name: "Define Matrix"
runs-on: ubuntu-latest
outputs:
enabled: ${{ steps.gate.outputs.enabled }}
php: ${{ steps.gendef.outputs.php }}
os: ${{ steps.gendef.outputs.os }}
steps:
- name: Check label
id: gate
run: |
LABELS='${{ toJSON(github.event.pull_request.labels.*.name) }}'
if echo "$LABELS" | grep -q '"need-test"'; then
echo "enabled=true" >> "$GITHUB_OUTPUT"
else
echo "enabled=false" >> "$GITHUB_OUTPUT"
fi
- name: "Checkout"
uses: actions/checkout@v4
test-bot:
name: "Test Bot: analyze PR"
needs: check-gate
if: needs.check-gate.outputs.enabled == 'true'
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
outputs:
need_test: ${{ steps.bot.outputs.need_test }}
gen_matrix_args: ${{ steps.bot.outputs.gen_matrix_args }}
gen_matrix_args_tier2: ${{ steps.bot.outputs.gen_matrix_args_tier2 }}
php_versions: ${{ steps.bot.outputs.php_versions }}
tier2: ${{ steps.bot.outputs.tier2 }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
- name: Run dev:test-bot
id: bot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BOT_JSON=$(php -d opcache.enable_cli=0 bin/spc dev:test-bot \
--pr=${{ github.event.pull_request.number }} \
--repo=${{ github.repository }} 2>/dev/null)
echo "need_test=$(echo "$BOT_JSON" | jq -r '.need_test')" >> "$GITHUB_OUTPUT"
echo "gen_matrix_args=$(echo "$BOT_JSON" | jq -r '.gen_matrix_args')" >> "$GITHUB_OUTPUT"
echo "gen_matrix_args_tier2=$(echo "$BOT_JSON" | jq -r '.gen_matrix_args_tier2')" >> "$GITHUB_OUTPUT"
echo "php_versions=$(echo "$BOT_JSON" | jq -c '.php_versions')" >> "$GITHUB_OUTPUT"
echo "tier2=$(echo "$BOT_JSON" | jq -r '.tier2')" >> "$GITHUB_OUTPUT"
COMMENT_BODY=$(echo "$BOT_JSON" | jq -r '.comment_body')
MARKER="<!-- spc-test-bot -->"
# Find existing bot comment id
EXISTING_ID=$(gh api \
repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq "[.[] | select(.body | startswith(\"$MARKER\")) | .id] | first // empty")
if [ -n "$EXISTING_ID" ]; then
gh api --method PATCH \
repos/${{ github.repository }}/issues/comments/"$EXISTING_ID" \
-f body="$COMMENT_BODY"
else
gh pr comment ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--body "$COMMENT_BODY"
fi
gen-matrix:
name: "Generate test matrix"
needs: test-bot
if: needs.test-bot.outputs.need_test == 'true'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
- name: Build matrix
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEN_MATRIX_ARGS: ${{ needs.test-bot.outputs.gen_matrix_args }}
GEN_MATRIX_ARGS_TIER2: ${{ needs.test-bot.outputs.gen_matrix_args_tier2 }}
PHP_VERSIONS: ${{ needs.test-bot.outputs.php_versions }}
TIER2: ${{ needs.test-bot.outputs.tier2 }}
run: |
# Tier1 matrix
MATRIX1=$(bin/spc dev:gen-ext-test-matrix $GEN_MATRIX_ARGS 2>/dev/null)
# Merge Tier2 if requested
if [ "$TIER2" = "true" ] && [ -n "$GEN_MATRIX_ARGS_TIER2" ]; then
MATRIX2=$(bin/spc dev:gen-ext-test-matrix $GEN_MATRIX_ARGS_TIER2 2>/dev/null)
COMBINED=$(jq -n --argjson m1 "$MATRIX1" --argjson m2 "$MATRIX2" '$m1 + $m2')
else
COMBINED=$MATRIX1
fi
# Expand PHP versions: cartesian product of entries × php_versions
FINAL=$(echo "$COMBINED" | jq --argjson versions "$PHP_VERSIONS" \
'[.[] | . as $entry | $versions[] | $entry + {"php-version": .}]')
echo "matrix=$(echo "$FINAL" | jq -c '{"combo": .}')" >> "$GITHUB_OUTPUT"
ext-test:
name: "Ext test: ${{ matrix.combo.extension }} (PHP ${{ matrix.combo.php-version }} · ${{ matrix.combo.os }}-${{ matrix.combo.arch }})"
needs: gen-matrix
runs-on: ${{ matrix.combo.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.gen-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: curl, openssl, mbstring
- name: Define
id: gendef
run: |
PHP_VERSIONS=$(php src/globals/test-extensions.php php)
OS_VERSIONS=$(php src/globals/test-extensions.php os)
echo 'php='"$PHP_VERSIONS" >> "$GITHUB_OUTPUT"
echo 'os='"$OS_VERSIONS" >> "$GITHUB_OUTPUT"
build:
name: "Build PHP Test (PHP ${{ matrix.php }} ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
needs: [define-matrix, php-cs-fixer, phpstan, phpunit]
timeout-minutes: 120
strategy:
matrix:
php: ${{ fromJSON(needs.define-matrix.outputs.php) }}
os: ${{ fromJSON(needs.define-matrix.outputs.os) }}
fail-fast: false
steps:
- name: "Update runner packages"
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: sudo apt-get update && sudo apt-get install -y ca-certificates
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: pecl, composer
extensions: curl, openssl, mbstring
ini-values: memory_limit=-1
tools: composer
env:
phpts: nts
- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev
- name: "Cache composer packages"
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Build
env:
SPC_USE_SUDO: "yes"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Cache downloaded source
- id: cache-download
uses: actions/cache@v4
with:
path: downloads
key: php-dependencies-${{ matrix.os }}
- name: "Install Dependencies"
run: composer update -vvv --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-plugins
- name: "Run Build Tests (doctor)"
run: php src/globals/test-extensions.php doctor_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Prepare UPX for Windows"
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
./bin/spc doctor --auto-fix
${{ matrix.combo.build-args }} --dl-with-php=${{ matrix.combo.php-version }}
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $env:GITHUB_ENV
# - name: Setup upterm session
# if: ${{ failure() }}
# uses: owenthereal/action-upterm@v1
- name: "Prepare UPX for Linux"
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
php src/globals/test-extensions.php install_upx_cmd ${{ matrix.os }} ${{ matrix.php }}
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
- name: Upload logs
if: always() && hashFiles('log/**') != ''
- name: "Run Build Tests (download)"
run: php src/globals/test-extensions.php download_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Run Build Tests (build)"
run: php src/globals/test-extensions.php build_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Run Build Tests (build - embed for non-windows)"
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: php src/globals/test-extensions.php build_embed_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: "Upload logs"
if: ${{ always() && hashFiles('log/**') != '' }}
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.combo.os }}-${{ matrix.combo.arch }}-${{ matrix.combo.extension }}-php${{ matrix.combo.php-version }}
name: build-logs-${{ matrix.os }}-${{ matrix.php }}
path: log
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

View File

@@ -1,68 +1,71 @@
name: Docs build test and auto deploy
on:
pull_request:
branches: [ "v3" ]
types: [ opened, synchronize, reopened ]
paths:
- 'config/**.yml'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
push:
branches: [ "v3" ]
paths:
- 'config/**.yml'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.repository == 'crazywhalecc/static-php-cli'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
- run: npm install
- name: "Install PHP for official runners"
uses: shivammathur/setup-php@v2
with:
coverage: none
tools: composer:v2
php-version: 8.4
ini-values: memory_limit=-1
extensions: curl, openssl, mbstring
- name: "Get Composer Cache Directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-8.2-locked-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
php-8.2-locked-composer
- name: "Install Locked Dependencies"
run: "composer install --no-interaction --no-progress"
- name: Build
run: npm run docs:build
# Deploy to GitHub Pages only when the workflow is triggered by a push to the v3 branch
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/v3'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
name: Docs Auto Deploy
on:
push:
branches:
- main
paths:
- 'config/**.json'
- 'docs/**'
- 'package.json'
- 'yarn.lock'
- '.github/workflows/vitepress-deploy.yml'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.repository == 'crazywhalecc/static-php-cli'
steps:
- name: Checkout master
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install --frozen-lockfile
- name: "Copy Config Files"
run: |
mkdir -p docs/.vitepress/config
cp -r config/* docs/.vitepress/config/
- name: "Install PHP for official runners"
uses: shivammathur/setup-php@v2
with:
coverage: none
tools: composer:v2
php-version: 8.4
ini-values: memory_limit=-1
extensions: curl, openssl, mbstring
- name: "Get Composer Cache Directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Cache Composer dependencies"
uses: "actions/cache@v4"
with:
path: "${{ steps.composer-cache.outputs.dir }}"
key: "php-8.2-locked-composer-${{ hashFiles('**/composer.lock') }}"
restore-keys: |
php-8.2-locked-composer
- name: "Install Locked Dependencies"
run: "composer install --no-interaction --no-progress"
- name: "Generate Extension Support List"
run: |
bin/spc dev:gen-ext-docs > docs/extensions.md
bin/spc dev:gen-ext-dep-docs > docs/deps-map-ext.md
bin/spc dev:gen-lib-dep-docs > docs/deps-map-lib.md
- name: Build
run: yarn docs:build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist

19
.gitignore vendored
View File

@@ -1,8 +1,8 @@
.idea
/runtime/
/docker/libraries/
/docker/extensions/
/docker/source/
runtime/
docker/libraries/
docker/extensions/
docker/source/
# Vendor files
/vendor/**
@@ -33,9 +33,6 @@ packlib_files.txt
.php-cs-fixer.cache
.phpunit.result.cache
# doctor cache fallback (when ~/.cache/spc/ is not writable)
.spc-doctor.lock
# exclude self-runtime
/bin/*
!/bin/spc*
@@ -52,8 +49,6 @@ packlib_files.txt
/node_modules/
/docs/.vitepress/dist/
/docs/.vitepress/cache/
/docs/.vitepress/ext-data.json
/docs/.vitepress/deps-data.json
package-lock.json
pnpm-lock.yaml
@@ -66,9 +61,3 @@ log/
# spc.phar
spc.phar
spc.exe
# dumped files from StaticPHP v3
/dump-*.json
# config parse cache
/.spc.cache.php

View File

@@ -69,6 +69,6 @@ return (new PhpCsFixer\Config())
'php_unit_data_provider_method_order' => false,
])
->setFinder(
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/StaticPHP'])
PhpCsFixer\Finder::create()->in([__DIR__ . '/src', __DIR__ . '/tests/SPC'])
)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());

3
README-en.md Executable file
View File

@@ -0,0 +1,3 @@
# static-php-cli
English README has been moved to [README.md](README.md).

View File

@@ -1,156 +1,172 @@
# StaticPHP
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/nrSRbpMJ?label=Discord&logo=discord&style=flat-square)](https://discord.gg/xf6Rd4pEAk)
**StaticPHP** 是一个强大的工具,用于构建可移植的可执行文件,包括 PHP、扩展等。
> [!IMPORTANT]
> 我们正准备发布 **v3** 版本,届时项目名称将从 **static-php-cli** 更改为 **StaticPHP**。
> 此分支对应 v3 版本。v2 版本请查看 [v2 分支](https://github.com/crazywhalecc/static-php-cli/tree/main)。
> 请更新您的参考资料,并关注正式版发布。
## 特性
- :elephant: 支持多个 PHP 版本 - PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: 构建零依赖的单文件 PHP 可执行程序
- :hamburger: 构建 **[phpmicro](https://github.com/static-php/phpmicro)** 自解压可执行文件(将 PHP 二进制和源码合并为单个文件)
- :pill: 自动构建环境检查器,支持自动修复
- :zap: 支持 `Linux``macOS``Windows`
- :wrench: 通过 vendor 模式和自定义注册表实现便捷扩展
- :books: 智能依赖管理
- 📦 自包含 `spc` 可执行文件,便于自安装
- :fire: 支持 100+ 热门 [PHP 扩展](https://static-php.dev/en/guide/extensions.html)
- :floppy_disk: 支持 UPX 压缩(二进制体积可缩小 30-50%
**单文件独立 php-cli**
<img width="700" alt="out1" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/01a2e60f-13b0-4242-a645-f7afa4936396">
**使用 phpmicro 将 PHP 代码与 PHP 解释器结合:**
<img width="700" alt="out2" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/46b7128d-fb72-4169-957e-48564c3ff3e2">
## 快速开始
### 1. 下载 spc 二进制
```bash
# For Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/nightly/spc-windows-x64.exe
```
对于 macOS 和 Linux请先添加可执行权限
```bash
chmod +x ./spc
```
### 2. 构建静态 PHP
首先,创建 `craft.yml` 文件,并从 [扩展列表](https://static-php.dev/en/guide/extensions.html) 或 [命令生成器](https://static-php.dev/en/guide/cli-generator.html) 指定要包含的扩展:
```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.5
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
download-options:
parallel: 10
```
运行命令:
```bash
./spc craft
# 输出完整控制台日志
./spc craft -vvv
```
### 3. 静态 PHP 使用
现在你可以将 StaticPHP 构建的二进制复制到另一台机器并在无依赖环境下运行:
```
# php-cli
buildroot/bin/php -v
# phpmicro
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
```
## 文档
当前 README 包含基础用法。有关 StaticPHP 的完整功能集,
请访问 <https://static-php.dev>。
## 直接下载
如果你暂时不想构建,或只想先测试,可以从 [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) 下载示例预编译产物,或从自托管服务器下载。
我们为每个 PHP 版本提供 2 种扩展集合:
- **gigantic**:尽可能包含更多扩展,二进制大小约 100-150MB。
- **base**:仅包含 StaticPHP 自身使用的少量扩展,二进制大小约 10MB。
> WIP
### 在线构建(使用 GitHub Actions
当上方直接下载的二进制无法满足你的需求时,
你可以使用 GitHub Actions 轻松构建静态编译的 PHP
并同时自定义要编译的扩展列表
1. Fork 此仓库。
2. 进入项目的 Actions 并选择 `CI`
3. 选择 `Run workflow`,填写你要编译的 PHP 版本、目标类型和扩展列表。(扩展用逗号分隔,例如 `bcmath,curl,mbstring`
4. 等待工作流执行完成后,进入对应运行记录并下载 `Artifacts`
如果你启用 `debug`,构建时将输出所有日志,包括编译日志,便于排查问题
> 我们也计划在未来提供可复用的 GitHub Actions 工作流,
> 这样你无需 fork 本项目,也能在自己的仓库中轻松构建 static PHP
## 贡献
如果你需要的扩展缺失,可以创建 issue。
如果你熟悉本项目,也欢迎发起 pull request。
如果你想贡献文档,请直接编辑 `docs/`
## 赞助本项目
你可以通过 [GitHub Sponsor](https://github.com/crazywhalecc) 赞助我或我的项目。你捐赠的一部分将用于维护 **static-php.dev** 服务器
**特别感谢以下赞助商:**
<a href="https://beyondco.de/"><img src="/docs/public/images/beyondcode-seeklogo.png" width="300" alt="Beyond Code Logo" /></a>
<a href="https://nativephp.com/"><img src="/docs/public/images/nativephp-logo.svg" width="300" alt="NativePHP Logo" /></a>
## 开源许可证
本项目本身采用 MIT 许可证。
一些新添加的扩展和依赖可能来自其他项目。
这些源码文件头部也可能包含额外的 LICENSE 和 AUTHOR 信息。
请在编译后使用 `bin/spc dump-license` 命令导出项目中使用的开源许可证,
并遵守对应项目的 LICENSE。
# static-php-cli
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
**static-php-cli** 是一个用于构建静态、独立 PHP 运行时的强大工具,支持众多流行扩展。
## 特性
- :elephant: **支持多 PHP 版本** - 支持 PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: **单文件 PHP 可执行文件** - 构建零依赖的独立 PHP
- :hamburger: **phpmicro 集成** - 构建 **[phpmicro](https://github.com/dixyes/phpmicro)** 自解压可执行文件(将 PHP 二进制文件和源代码合并为一个文件)
- :pill: **智能环境检查器** - 自动构建环境检查器,具备自动修复功能
- :zap: **跨平台支持** - 支持 Linux、macOS、FreeBSD 和 Windows
- :wrench: **可配置补丁** - 可自定义的源代码补丁系统
- :books: **智能依赖管理** - 自动处理构建依赖
- 📦 **自包含工具** - 提供使用 [box](https://github.com/box-project/box) 构建的 `spc` 可执行文件
- :fire: **广泛的扩展支持** - 支持 75+ 流行 [扩展](https://static-php.dev/zh/guide/extensions.html)
- :floppy_disk: **UPX 压缩** - 减小二进制文件大小 30-50%(仅 Linux/Windows
**单文件独立 php-cli**
<img width="700" alt="out1" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/01a2e60f-13b0-4242-a645-f7afa4936396">
**使用 phpmicro 将 PHP 代码与 PHP 解释器结合:**
<img width="700" alt="out2" src="https://github.com/crazywhalecc/static-php-cli/assets/20330940/46b7128d-fb72-4169-957e-48564c3ff3e2">
## 快速开始
### 1. 下载 spc 二进制文件
```bash
# Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 或更高版本,请先安装 VS2022)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
```
对于 macOS 和 Linux请先添加执行权限
```bash
chmod +x ./spc
```
### 2. 构建静态 PHP
首先,创建一个 `craft.yml` 文件,并从 [扩展列表](https://static-php.dev/zh/guide/extensions.html) 或 [命令生成器](https://static-php.dev/zh/guide/cli-generator.html) 中指定要包含的扩展:
```yml
# PHP 版本支持8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.4
# 在此处放置您的扩展列表
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
- fpm
download-options:
prefer-pre-built: true
```
运行命令:
```bash
./spc craft
# 输出完整控制台日志
./spc craft --debug
```
### 3. 静态 PHP 使用
现在您可以将 static-php-cli 构建的二进制文件复制到另一台机器上,无需依赖即可运行:
```
# php-cli
buildroot/bin/php -v
# phpmicro
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
# php-fpm
buildroot/bin/php-fpm -v
```
## 文档
当前 README 包含基本用法。有关 static-php-cli 的所有功能,
请访问 <https://static-php.dev>。
## 直接下载
如果您不想构建或想先测试,可以从 [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) 下载示例预编译工件,或从自托管服务器下载。
以下是几个具有不同扩展组合的预编译静态 PHP 二进制文件,
您可以根据需要直接下载。
| 组合名称 | 扩展数量 | 系统 | 备注 |
|----------------------------------------------------------------------|----------------------------------------------------------------------------|--------------|--------------------|
| [common](https://dl.static-php.dev/static-php-cli/common/) | [30+](https://dl.static-php.dev/static-php-cli/common/README.txt) | Linux, macOS | 二进制文件大小约为 7.5MB |
| [bulk](https://dl.static-php.dev/static-php-cli/bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | 二进制文件大小约为 25MB |
| [gnu-bulk](https://dl.static-php.dev/static-php-cli/gnu-bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | 使用 glibc 的 bulk 组合 |
| [minimal](https://dl.static-php.dev/static-php-cli/minimal/) | [5](https://dl.static-php.dev/static-php-cli/minimal/README.txt) | Linux, macOS | 二进制文件大小约为 3MB |
| [spc-min](https://dl.static-php.dev/static-php-cli/windows/spc-min/) | [5](https://dl.static-php.dev/static-php-cli/windows/spc-min/README.txt) | Windows | 二进制文件大小约为 3MB |
| [spc-max](https://dl.static-php.dev/static-php-cli/windows/spc-max/) | [40+](https://dl.static-php.dev/static-php-cli/windows/spc-max/README.txt) | Windows | 二进制文件大小约为 8.5MB |
> Linux 和 Windows 支持对二进制文件进行 UPX 压缩,可以将二进制文件大小减少 30% 到 50%。
> macOS 不支持 UPX 压缩,因此 mac 的预构建二进制文件大小较大
### 在线构建(使用 GitHub Actions
上方直接下载的二进制不能满足需求时,可使用 GitHub Action 可以轻松构建静态编译的 PHP
同时自行定义要编译的扩展
1. Fork 本项目
2. 进入项目的 Actions 并选择 `CI`
3. 选择 `Run workflow`,填入您要编译的 PHP 版本、目标类型和扩展列表。(扩展用逗号分隔,例如 `bcmath,curl,mbstring`
4. 等待一段时间后,进入相应的任务并获取 `Artifacts`
如果您启用 `debug`,构建时将输出所有日志,包括编译日志,以便故障排除。
## 贡献
如果您需要的扩展缺失,可以创建 issue。
如果您熟悉本项目,也欢迎发起 pull request
如果您想贡献文档,请直接编辑 `docs/` 目录。
现在有一个 [static-php](https://github.com/static-php) 组织,用于存储与项目相关的仓库
## 赞助本项目
您可以从 [GitHub Sponsor](https://github.com/crazywhalecc) 赞助我或我的项目。您捐赠的一部分将用于维护 **static-php.dev** 服务器。
**特别感谢以下赞助商**
<a href="https://beyondco.de/"><img src="/docs/public/images/beyondcode-seeklogo.png" width="300" alt="Beyond Code Logo" /></a>
<a href="https://nativephp.com/"><img src="/docs/public/images/nativephp-logo.svg" width="300" alt="NativePHP Logo" /></a>
## 开源许可证
本项目本身基于 MIT 许可证,
一些新添加的扩展和依赖可能来自其他项目,
这些代码文件的头部也会给出额外的许可证和作者说明。
这些是类似的项目:
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs)
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli)
本项目使用了 [dixyes/lwmbs](https://github.com/dixyes/lwmbs) 的一些代码,例如 Windows 静态构建目标和 libiconv 支持。
lwmbs 基于 [Mulan PSL 2](http://license.coscl.org.cn/MulanPSL2) 许可证。
由于本项目的特殊性,
项目编译过程中会使用许多其他开源项目,如 curl 和 protobuf
它们都有自己的开源许可证。
请在编译后使用 `bin/spc dump-license` 命令导出项目中使用的开源许可证,
并遵守相应项目的 LICENSE。

View File

@@ -1,30 +1,25 @@
# StaticPHP
# static-php-cli
[![Chinese readme](https://img.shields.io/badge/README-%E4%B8%AD%E6%96%87%20%F0%9F%87%A8%F0%9F%87%B3-moccasin?style=flat-square)](README-zh.md)
[![English readme](https://img.shields.io/badge/README-English%20%F0%9F%87%AC%F0%9F%87%A7-moccasin?style=flat-square)](README.md)
[![Releases](https://img.shields.io/packagist/v/crazywhalecc/static-php-cli?include_prereleases&label=Release&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/releases)
[![CI](https://img.shields.io/github/actions/workflow/status/crazywhalecc/static-php-cli/tests.yml?branch=main&label=Build%20Test&style=flat-square)](https://github.com/crazywhalecc/static-php-cli/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/crazywhalecc/static-php-cli/blob/main/LICENSE)
[![Discord](https://img.shields.io/discord/nrSRbpMJ?label=Discord&logo=discord&style=flat-square)](https://discord.gg/xf6Rd4pEAk)
**StaticPHP** is a powerful tool designed for building portable executables including PHP, extensions, and more.
> [!IMPORTANT]
> We are preparing to release **v3**, which will include a project rename from **static-php-cli** to **StaticPHP**.
> And this branch is for v3. For v2, please check the [v2 branch](https://github.com/crazywhalecc/static-php-cli/tree/main).
> Please update your references and stay tuned for the official release.
**static-php-cli** is a powerful tool designed for building static, standalone PHP runtime
with popular extensions.
## Features
- :elephant: Support multiple PHP versions - PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :handbag: Build single-file PHP executable with zero dependencies
- :hamburger: Build **[phpmicro](https://github.com/static-php/phpmicro)** self-extracting executables (combines PHP binary and source code into one file)
- :hamburger:Build **[phpmicro](https://github.com/dixyes/phpmicro)** self-extracting executables (combines PHP binary and source code into one file)
- :pill: Automatic build environment checker with auto-fix capabilities
- :zap: `Linux`, `macOS`, `Windows` support
- :wrench: Easy to extend with vendor mode and custom registries
- :zap: `Linux`, `macOS`, `FreeBSD`, `Windows` support
- :wrench: Configurable source code patching
- :books: Intelligent dependency management
- 📦 Self-contained `spc` executable for easy self-installation
- :fire: Support 100+ popular [PHP extensions](https://static-php.dev/en/guide/extensions.html)
- 📦 Self-contained `spc` executable (built with [box](https://github.com/box-project/box))
- :fire: Support 100+ popular [extensions](https://static-php.dev/en/guide/extensions.html)
- :floppy_disk: UPX compression support (reduces binary size by 30-50%)
**Single-file standalone php-cli:**
@@ -41,15 +36,15 @@
```bash
# For Linux x86_64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-x86_64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
# For Linux aarch64
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-linux-aarch64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-aarch64
# macOS x86_64 (Intel)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-x86_64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-x86_64
# macOS aarch64 (Apple)
curl -fsSL -o spc https://dl.static-php.dev/v3/spc-bin/nightly/spc-macos-aarch64
curl -fsSL -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-macos-aarch64
# Windows (x86_64, win10 build 17063 or later, please install VS2022 first)
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/v3/spc-bin/nightly/spc-windows-x64.exe
curl.exe -fsSL -o spc.exe https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe
```
For macOS and Linux, add execute permission first:
@@ -64,14 +59,15 @@ First, create a `craft.yml` file and specify which extensions you want to includ
```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
php-version: 8.5
php-version: 8.4
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
sapi:
- cli
- micro
- fpm
download-options:
parallel: 10
prefer-pre-built: true
```
Run command:
@@ -80,12 +76,12 @@ Run command:
./spc craft
# Output full console log
./spc craft -vvv
./spc craft --debug
```
### 3. Static PHP usage
Now you can copy binaries built by StaticPHP to another machine and run with no dependencies:
Now you can copy binaries built by static-php-cli to another machine and run with no dependencies:
```
# php-cli
@@ -95,40 +91,48 @@ buildroot/bin/php -v
echo '<?php echo "Hello world!\n";' > a.php
./spc micro:combine a.php -O my-app
./my-app
# php-fpm
buildroot/bin/php-fpm -v
```
## Documentation
The current README contains basic usage. For the complete feature set of StaticPHP,
see <https://static-php.dev>.
The current README contains basic usage. For all the features of static-php-cli,
see <https://static-php.dev> .
## Direct Download
If you do not want to build yet or just want to test first, you can download example pre-compiled artifacts from [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml) or from a self-hosted server.
If you don't want to build or want to test first, you can download example pre-compiled artifact from [Actions](https://github.com/static-php/static-php-cli-hosted/actions/workflows/build-php-bulk.yml), or from self-hosted server.
We offer 2 types of extension sets for each PHP version:
Below are several precompiled static-php binaries with different extension combinations,
which can be downloaded directly according to your needs.
- **gigantic**: Includes as many extensions as possible, the binary size is about 100-150MB.
- **base**: Only includes a few extensions used by StaticPHP itself, the binary size is about 10MB.
| Combination | Extension Count | OS | Comment |
|----------------------------------------------------------------------|----------------------------------------------------------------------------|--------------|--------------------------------|
| [common](https://dl.static-php.dev/static-php-cli/common/) | [30+](https://dl.static-php.dev/static-php-cli/common/README.txt) | Linux, macOS | The binary size is about 7.5MB |
| [bulk](https://dl.static-php.dev/static-php-cli/bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | The binary size is about 25MB |
| [gnu-bulk](https://dl.static-php.dev/static-php-cli/gnu-bulk/) | [50+](https://dl.static-php.dev/static-php-cli/bulk/README.txt) | Linux, macOS | Using shared glibc |
| [minimal](https://dl.static-php.dev/static-php-cli/minimal/) | [5](https://dl.static-php.dev/static-php-cli/minimal/README.txt) | Linux, macOS | The binary size is about 3MB |
| [spc-min](https://dl.static-php.dev/static-php-cli/windows/spc-min/) | [5](https://dl.static-php.dev/static-php-cli/windows/spc-min/README.txt) | Windows | The binary size is about 3MB |
| [spc-max](https://dl.static-php.dev/static-php-cli/windows/spc-max/) | [40+](https://dl.static-php.dev/static-php-cli/windows/spc-max/README.txt) | Windows | The binary size is about 8.5MB |
> WIP
> Linux and Windows supports UPX compression for binaries, which can reduce the size of the binary by 30% to 50%.
> macOS does not support UPX compression, so the size of the pre-built binaries for mac is larger.
### Build Online (using GitHub Actions)
When the direct-download binaries above cannot meet your needs,
you can use GitHub Actions to easily build a statically compiled PHP
while defining your own extension list.
When the above direct download binaries cannot meet your needs,
you can use GitHub Action to easily build a statically compiled PHP,
and at the same time define the extensions to be compiled by yourself.
1. Fork this repository.
1. Fork me.
2. Go to the Actions of the project and select `CI`.
3. Select `Run workflow`, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. `bcmath,curl,mbstring`)
4. After waiting for the workflow to finish, open the corresponding run and download `Artifacts`.
4. After waiting for about a period of time, enter the corresponding task and get `Artifacts`.
If you enable `debug`, all logs will be output at build time, including compiled logs, for troubleshooting.
> We are also planning to provide a reusable GitHub Actions workflow in the future,
> so that you can easily build static PHP in your own repository, without forking this project.
## Contribution
If the extension you need is missing, you can create an issue.
@@ -136,6 +140,8 @@ If you are familiar with this project, you are also welcome to initiate a pull r
If you want to contribute documentation, please just edit in `docs/`.
Now there is a [static-php](https://github.com/static-php) organization, which is used to store the repo related to the project.
## Sponsor this project
You can sponsor me or my project from [GitHub Sponsor](https://github.com/crazywhalecc). A portion of your donation will be used to maintain the **static-php.dev** server.
@@ -148,9 +154,21 @@ You can sponsor me or my project from [GitHub Sponsor](https://github.com/crazyw
## Open-Source License
This project itself is licensed under MIT.
Some newly added extensions and dependencies may originate from other projects.
The headers of those source files may also include additional LICENSE and AUTHOR information.
This project itself is based on MIT License,
some newly added extensions and dependencies may originate from the the other projects,
and the headers of these code files will also be given additional instructions LICENSE and AUTHOR.
These are similar projects:
- [dixyes/lwmbs](https://github.com/dixyes/lwmbs)
- [swoole/swoole-cli](https://github.com/swoole/swoole-cli)
The project uses some code from [dixyes/lwmbs](https://github.com/dixyes/lwmbs), such as windows static build target and libiconv support.
lwmbs is licensed under the [Mulan PSL 2](http://license.coscl.org.cn/MulanPSL2).
Due to the special nature of this project,
many other open source projects such as curl and protobuf will be used during the project compilation process,
and they all have their own open source licenses.
Please use the `bin/spc dump-license` command to export the open source licenses used in the project after compilation,
and comply with the corresponding project's LICENSE.

23
bin/spc
View File

@@ -1,9 +1,13 @@
#!/usr/bin/env php
<?php
use StaticPHP\ConsoleApplication;
use StaticPHP\Exception\ExceptionHandler;
use StaticPHP\Exception\SPCException;
use SPC\ConsoleApplication;
use SPC\exception\ExceptionHandler;
// Load custom php if exists
if (PHP_OS_FAMILY !== 'Windows' && PHP_BINARY !== (__DIR__ . '/php') && file_exists(__DIR__ . '/php') && is_executable(__DIR__ . '/php')) {
pcntl_exec(__DIR__ . '/php', $argv);
}
if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
// Current: ./bin (git/project mode)
@@ -13,6 +17,11 @@ if (file_exists(dirname(__DIR__) . '/vendor/autoload.php')) {
require_once dirname(__DIR__, 3) . '/autoload.php';
}
// 防止 Micro 打包状态下不支持中文的显示(虽然这个项目目前好像没输出过中文?)
if (PHP_OS_FAMILY === 'Windows' && Phar::running()) {
exec('CHCP 65001');
}
// Print deprecation notice on PHP < 8.4, use red and highlight background
if (PHP_VERSION_ID < 80400) {
echo "\e[43mDeprecation Notice: PHP < 8.4 is deprecated, please upgrade your PHP version.\e[0m\n";
@@ -20,9 +29,7 @@ if (PHP_VERSION_ID < 80400) {
try {
(new ConsoleApplication())->run();
} catch (SPCException $e) {
exit(ExceptionHandler::handleSPCException($e));
} catch (\Throwable $e) {
exit(ExceptionHandler::handleDefaultException($e));
} catch (Exception $e) {
ExceptionHandler::getInstance()->handle($e);
exit(1);
}

View File

@@ -3,7 +3,7 @@
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v7
SPC_DOCKER_VERSION=v6
# Detect docker can run
if ! which docker >/dev/null; then
@@ -108,7 +108,8 @@ RUN apk update; \
wget \
xz \
gettext-dev \
binutils-gold
binutils-gold \
patchelf
RUN curl -#fSL https://dl.static-php.dev/static-php-cli/bulk/php-8.4.4-cli-linux-\$(uname -m).tar.gz | tar -xz -C /usr/local/bin && \
chmod +x /usr/local/bin/php
@@ -122,7 +123,6 @@ COPY ./composer.* /app/
ADD ./bin /app/bin
RUN composer install --no-dev
ADD ./config /app/config
ADD ./spc.registry.yml /app/spc.registry.yml
RUN bin/spc doctor --auto-fix
RUN bin/spc install-pkg upx
@@ -162,47 +162,6 @@ if [ ! -z "$GITHUB_TOKEN" ]; then
ENV_LIST="$ENV_LIST -e GITHUB_TOKEN=$GITHUB_TOKEN"
fi
# Intercept and rewrite --with-frankenphp-app option, and mount host path to /app/app
FRANKENPHP_APP_PATH=""
NEW_ARGS=()
while [ $# -gt 0 ]; do
case "$1" in
--with-frankenphp-app=*)
FRANKENPHP_APP_PATH="${1#*=}"
NEW_ARGS+=("--with-frankenphp-app=/app/app")
shift
;;
--with-frankenphp-app)
if [ -n "${2:-}" ]; then
FRANKENPHP_APP_PATH="$2"
NEW_ARGS+=("--with-frankenphp-app=/app/app")
shift 2
else
NEW_ARGS+=("$1")
shift
fi
;;
*)
NEW_ARGS+=("$1")
shift
;;
esac
done
# Normalize the path and add mount if provided
if [ -n "$FRANKENPHP_APP_PATH" ]; then
# expand ~ to $HOME
if [ "${FRANKENPHP_APP_PATH#~}" != "$FRANKENPHP_APP_PATH" ]; then
FRANKENPHP_APP_PATH="$HOME${FRANKENPHP_APP_PATH#~}"
fi
# make absolute if relative
case "$FRANKENPHP_APP_PATH" in
/*) ABS_APP_PATH="$FRANKENPHP_APP_PATH" ;;
*) ABS_APP_PATH="$(pwd)/$FRANKENPHP_APP_PATH" ;;
esac
MOUNT_LIST="$MOUNT_LIST -v $ABS_APP_PATH:/app/app"
fi
# Run docker
# shellcheck disable=SC2068
# shellcheck disable=SC2086
@@ -224,5 +183,5 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
set -ex
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
else
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc "${NEW_ARGS[@]}"
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
fi

View File

@@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Use SPC_XDEBUG=profile to enable Xdebug profiling mode, which will generate profiling files in /tmp.
# Otherwise, it will enable Xdebug debugging mode, which allows you to connect a debugger to port 9003.
if [ "$SPC_XDEBUG" = "profile" ]; then
XDEBUG_PREFIX="-d xdebug.mode=profile -d xdebug.start_with_request=yes -d xdebug.output_dir=/tmp -d xdebug.output_name=spc-profile.%t.%p.%r"
else
XDEBUG_PREFIX="-d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes"
fi
# This script runs the 'spc' command with Xdebug enabled for debugging purposes.
php $XDEBUG_PREFIX "$(dirname "$0")/../bin/spc" "$@"

View File

@@ -1,12 +0,0 @@
$PHP_Exec = ".\runtime\php.exe"
if (-not(Test-Path $PHP_Exec)) {
$PHP_Exec = Get-Command php.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Definition
if (-not $PHP_Exec) {
Write-Host "Error: PHP not found, you need to install PHP on your system or use 'bin/setup-runtime'." -ForegroundColor Red
exit 1
}
}
& "$PHP_Exec" -d xdebug.mode=debug -d xdebug.client_host=127.0.0.1 -d xdebug.client_port=9003 -d xdebug.start_with_request=yes ("bin/spc") @args
exit $LASTEXITCODE

200
bin/spc-gnu-docker Executable file
View File

@@ -0,0 +1,200 @@
#!/usr/bin/env bash
set -e
# This file is using docker to run commands
SPC_DOCKER_VERSION=v6
# Detect docker can run
if ! which docker >/dev/null; then
echo "Docker is not installed, please install docker first !"
exit 1
fi
DOCKER_EXECUTABLE="docker"
# shellcheck disable=SC2046
if [ $(id -u) -ne 0 ]; then
if ! docker info > /dev/null 2>&1; then
if [ "$SPC_USE_SUDO" != "yes" ] && [ "$SPC_DOCKER_DEBUG" != "yes" ]; then
echo "Docker command requires sudo"
# shellcheck disable=SC2039
echo -n 'To use sudo to run docker, run "export SPC_USE_SUDO=yes" and run command again'
exit 1
fi
DOCKER_EXECUTABLE="sudo docker"
fi
fi
# Convert uname to gnu arch
CURRENT_ARCH=$(uname -m)
if [ "$CURRENT_ARCH" = "arm64" ]; then
CURRENT_ARCH=aarch64
fi
if [ -z "$SPC_USE_ARCH" ]; then
SPC_USE_ARCH=$CURRENT_ARCH
fi
# parse SPC_USE_ARCH
case $SPC_USE_ARCH in
x86_64|amd64)
SPC_USE_ARCH=x86_64
SPC_USE_ARCH_DOCKER=amd64
if [ "$CURRENT_ARCH" != "x86_64" ]; then
PLATFORM_ARG="--platform linux/amd64"
fi
;;
aarch64|arm64)
SPC_USE_ARCH=aarch64
SPC_USE_ARCH_DOCKER=arm64
if [ "$CURRENT_ARCH" != "aarch64" ]; then
PLATFORM_ARG="--platform linux/arm64"
fi
;;
*)
echo "Current arch is not supported to run in docker: $SPC_USE_ARCH"
exit 1
;;
esac
# detect if we need to use qemu-static
if [ "$SPC_USE_ARCH" != "$CURRENT_ARCH" ]; then
if [ "$(uname -s)" = "Linux" ]; then
echo "* Using different arch needs to setup qemu-static for docker !"
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static --reset -p yes > /dev/null
fi
fi
# Detect docker env is setup
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION; then
echo "Docker container does not exist. Building docker image ..."
$DOCKER_EXECUTABLE buildx build $PLATFORM_ARG -t cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
FROM centos:7
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
RUN yum clean all && \
yum makecache && \
yum update -y && \
localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN yum install -y centos-release-scl
RUN if [ "$SPC_USE_ARCH" = "aarch64" ]; then \
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo ; \
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo ; \
else \
sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo ; \
fi
RUN sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo && \
sed -i 's|http://|https://|g' /etc/yum.repos.d/*.repo
RUN yum update -y && \
yum install -y devtoolset-10-gcc-* devtoolset-10-libatomic-devel
RUN echo "source scl_source enable devtoolset-10" >> /etc/bashrc
RUN source /etc/bashrc
RUN yum install -y which
RUN curl -fsSL -o patchelf.tgz https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-$SPC_USE_ARCH.tar.gz && \
mkdir -p /patchelf && \
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
cp /patchelf/bin/patchelf /usr/bin/
RUN curl -o cmake.tgz -#fSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
mkdir /cmake && \
tar -xzf cmake.tgz -C /cmake --strip-components 1
WORKDIR /app
COPY ./composer.* /app/
ADD ./bin/setup-runtime /app/bin/setup-runtime
ADD ./bin/spc /app/bin/spc
RUN /app/bin/setup-runtime
ADD ./src /app/src
RUN /app/bin/php /app/bin/composer install --no-dev
ENV SPC_LIBC=glibc
ENV PATH="/app/bin:/cmake/bin:/opt/rh/devtoolset-10/root/usr/bin:\$PATH"
ADD ./config /app/config
RUN CC=gcc bin/spc doctor --auto-fix --debug
RUN bin/spc install-pkg upx
RUN if [ -f /app/buildroot/bin/re2c ]; then \
cp /app/buildroot/bin/re2c /usr/local/bin/re2c ;\
fi
RUN curl -o make.tgz -fsSL https://ftp.gnu.org/gnu/make/make-4.4.tar.gz && \
tar -zxvf make.tgz && \
cd make-4.4 && \
./configure && \
make && \
make install && \
ln -sf /usr/local/bin/make /usr/bin/make
RUN curl -o automake.tgz -fsSL https://ftp.gnu.org/gnu/automake/automake-1.17.tar.xz && \
tar -xvf automake.tgz && \
cd automake-1.17 && \
./configure && \
make && \
make install && \
ln -sf /usr/local/bin/automake /usr/bin/automake
RUN mv /app/pkgroot/\$(uname -m)-linux /app/pkgroot-private
ADD bin/docker-entrypoint.sh /bin/docker-entrypoint.sh
RUN chmod +x /bin/docker-entrypoint.sh
ENTRYPOINT ["/bin/docker-entrypoint.sh"]
EOF
fi
# Check if in ci (local terminal can execute with -it)
if [ -t 0 ]; then
INTERACT=-it
else
INTERACT=''
fi
# Mounting volumes
MOUNT_LIST=""
# shellcheck disable=SC2089
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/config:/app/config"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/src:/app/src"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/buildroot:/app/buildroot"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/source:/app/source"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/dist:/app/dist"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/downloads:/app/downloads"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/pkgroot:/app/pkgroot"
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/log:/app/log"
if [ -f "$(pwd)/craft.yml" ]; then
MOUNT_LIST="$MOUNT_LIST -v ""$(pwd)""/craft.yml:/app/craft.yml"
fi
# Apply env in temp env file
echo 'SPC_DEFAULT_C_FLAGS=-fPIC' > /tmp/spc-gnu-docker.env
echo 'SPC_LIBC=glibc' >> /tmp/spc-gnu-docker.env
# Environment variable passthrough
ENV_LIST=""
ENV_LIST="$ENV_LIST -e SPC_FIX_DEPLOY_ROOT="$(pwd)""
if [ ! -z "$GITHUB_TOKEN" ]; then
ENV_LIST="$ENV_LIST -e GITHUB_TOKEN=$GITHUB_TOKEN"
fi
# Run docker
# shellcheck disable=SC2068
# shellcheck disable=SC2086
# shellcheck disable=SC2090
if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
echo "* Debug mode enabled, run docker in interactive mode."
echo "* You can use 'exit' to exit the docker container."
echo "* You can use 'bin/spc' like normal builds."
echo "*"
echo "* Mounted directories:"
echo "* ./config: $(pwd)/config"
echo "* ./src: $(pwd)/src"
echo "* ./buildroot: $(pwd)/buildroot"
echo "* ./source: $(pwd)/source"
echo "* ./dist: $(pwd)/dist"
echo "* ./downloads: $(pwd)/downloads"
echo "* ./pkgroot: $(pwd)/pkgroot"
echo "*"
set -ex
$DOCKER_EXECUTABLE run $PLATFORM_ARG --privileged --rm -it $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
else
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
fi

View File

@@ -1,22 +1,19 @@
{
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"check-requirements": false,
"directories": [
"config",
"src",
"vendor/psr",
"vendor/symfony",
"vendor/php-di",
"vendor/zhamao"
],
"files": [
"spc.registry.yml"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
"alias": "spc-php.phar",
"banner": false,
"blacklist": [
".github"
],
"compression": "GZ",
"directories": [
"config",
"src",
"vendor/psr",
"vendor/laravel/prompts",
"vendor/illuminate",
"vendor/symfony",
"vendor/zhamao"
],
"git-commit-short": "git_commit_short",
"output": "spc.phar"
}

View File

@@ -3,7 +3,7 @@
"enabled": true,
"actions": [
{
"action": "php vendor/bin/phpstan analyse --memory-limit 300M"
"action": "composer analyse"
}
]
},
@@ -11,22 +11,13 @@
"enabled": true,
"actions": [
{
"action": "php vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php} --sequential",
"action": "composer cs-fix -- --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"]
}
]
},
{
"action": "bin/spc dev:lint-config --check",
"conditions": [
{
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\InDirectory",
"args": ["config"]
}
]
}
]
},

View File

@@ -9,26 +9,26 @@
}
],
"require": {
"php": ">=8.4",
"php": ">= 8.3",
"ext-mbstring": "*",
"ext-zlib": "*",
"php-di/php-di": "^7.1",
"laravel/prompts": "^0.1.12",
"symfony/console": "^5.4 || ^6 || ^7",
"symfony/process": "^7.2",
"symfony/yaml": "^7.2",
"zhamao/logger": "^1.1.4"
"zhamao/logger": "^1.1.3"
},
"require-dev": {
"captainhook/captainhook-phar": "^5.23",
"captainhook/hook-installer": "^1.0",
"friendsofphp/php-cs-fixer": "^3.60",
"humbug/box": "^4.5.0 || ^4.6.0",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.3 || ^9.5"
},
"autoload": {
"psr-4": {
"StaticPHP\\": "src/StaticPHP",
"Package\\": "src/Package"
"SPC\\": "src/SPC"
},
"files": [
"src/globals/defines.php",
@@ -37,7 +37,7 @@
},
"autoload-dev": {
"psr-4": {
"Tests\\StaticPHP\\": "tests/StaticPHP"
"SPC\\Tests\\": "tests/SPC"
}
},
"bin": [
@@ -46,7 +46,6 @@
"scripts": {
"analyse": "phpstan analyse --memory-limit 300M",
"cs-fix": "php-cs-fixer fix",
"lint-config": "php bin/spc dev:lint-config",
"test": "vendor/bin/phpunit tests/ --no-coverage",
"build:phar": "vendor/bin/box compile"
},
@@ -60,9 +59,6 @@
"optimize-autoloader": true,
"sort-packages": true
},
"suggest": {
"ext-yaml": "Speeds up YAML config file parsing"
},
"funding": [
{
"type": "other",

1362
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +0,0 @@
glfw:
metadata:
license-files:
- LICENSE
license: MIT
source:
type: git
url: 'https://github.com/mario-deluna/php-glfw'
rev: master

View File

@@ -1,2 +0,0 @@
musl-wrapper:
source: 'https://musl.libc.org/releases/musl-1.2.5.tar.gz'

View File

@@ -1,12 +0,0 @@
ncurses:
metadata:
license-files:
- COPYING
source:
type: filelist
url: 'https://ftp.gnu.org/gnu/ncurses/'
regex: '/href="(?<file>ncurses-(?<version>[^"]+)\.tar\.gz)"/'
source-mirror:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/ncurses/'
regex: '/href="(?<file>ncurses-(?<version>[^"]+)\.tar\.gz)"/'

View File

@@ -1,11 +0,0 @@
php-src:
metadata:
license-files:
- LICENSE
license: PHP-3.01
source:
type: php-release
domain: 'https://www.php.net'
source-mirror:
type: php-release
domain: 'https://phpmirror.static-php.dev'

View File

@@ -1,42 +1,40 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; static-php-cli (spc) env configuration
;
; This file is used to set default env vars for static-php-cli build.
; As dynamic build process, some of these vars can be overwritten by CLI options.
; And you can also overwrite these vars by setting them in your shell environment.
; The value should be changed only if you know what you are doing. Otherwise, please leave them as default.
;
; We need to use some pre-defined internal env vars, like `BUILD_ROOT_PATH`, `DOWNLOAD_PATH`, etc.
; Please note that these vars cannot be defined in this file, they should only be defined before static-php-cli running.
; Please note that these vars cannot be defined in this file, they are only be defined before static-php-cli running.
;
; Here's a list of env vars, these variables will be defined if not defined:
; Here's a list of env vars, these value cannot be changed anywhere:
;
; SPC_VERSION: the version of static-php-cli.
; WORKING_DIR: the working directory of the build process. (default: `$(pwd)`)
; ROOT_DIR: the root directory of static-php-cli. (default: `/path/to/static-php-cli`, when running in phar or micro mode: `phar://path/to/spc.phar`)
; BUILD_ROOT_PATH: the root path of the build process. (default: `$(pwd)/buildroot`)
; BUILD_INCLUDE_PATH: the path of the include files. (default: `$BUILD_ROOT_PATH/include`)
; BUILD_LIB_PATH: the path of the lib files. (default: `$BUILD_ROOT_PATH/lib`)
; BUILD_BIN_PATH: the path of the bin files. (default: `$BUILD_ROOT_PATH/bin`)
; BUILD_MODULES_PATH: the path of the php modules (shared extensions) files. (default: `$BUILD_ROOT_PATH/modules`)
; PKG_ROOT_PATH: the root path of the package files. (default: `$(pwd)/pkgroot/$GNU_ARCH-{darwin|linux|windows}`)
; PKG_ROOT_PATH: the root path of the package files. (default: `$(pwd)/pkgroot`)
; SOURCE_PATH: the path of the source files. (default: `$(pwd)/source`)
; DOWNLOAD_PATH: the path of the download files. (default: `$(pwd)/downloads`)
; PATH: (*nix only) static-php-cli will add `$BUILD_BIN_PATH` to PATH.
; PKG_CONFIG_PATH: (*nix only) static-php-cli will set `$BUILD_LIB_PATH/pkgconfig` to PKG_CONFIG_PATH.
; CPU_COUNT: the count of the CPU cores. (default: `$(nproc)`)
; SPC_ARCH: the arch of the current system, for some libraries needed `--host=XXX` args. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`, `arm64`)
; GNU_ARCH: the GNU arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`)
; MAC_ARCH: the MAC arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `arm64`)
;
; Here's a list of env vars, these variables is defined in SPC and cannot be changed anywhere:
; * These vars are only be defined in Unix (macOS, Linux, FreeBSD)Builder and cannot be changed anywhere:
; PATH: static-php-cli will add `$BUILD_BIN_PATH` to PATH.
; PKG_CONFIG: static-php-cli will set `$BUILD_BIN_PATH/pkg-config` to PKG_CONFIG.
; PKG_CONFIG_PATH: static-php-cli will set `$BUILD_LIB_PATH/pkgconfig` to PKG_CONFIG_PATH.
;
; SPC_VERSION: the version of static-php-cli.
; WORKING_DIR: the working directory of the build process. (default: `$(pwd)`)
; ROOT_DIR: the root directory of static-php-cli. (default: `/path/to/static-php-cli`, when running in phar or micro mode: `phar://path/to/spc.phar`)
; CPU_COUNT: the count of the CPU cores. (default: `$(nproc)`)
; SPC_ARCH: the arch of the current system, for some libraries needed `--host=XXX` args. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`, `arm64`)
; GNU_ARCH: the GNU arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `aarch64`)
; MAC_ARCH: the MAC arch of the current system. (default: `$(uname -m)`, e.g. `x86_64`, `arm64`)
; PKG_CONFIG: (*nix only) static-php-cli will set `$BUILD_BIN_PATH/pkg-config` to PKG_CONFIG.
; SPC_DEFAULT_CC: (*nix only) the default compiler for selected toolchain.
; SPC_DEFAULT_CXX: (*nix only) the default c++ compiler selected toolchain.
; SPC_DEFAULT_AR: (*nix only) the default archiver for selected toolchain.
; SPC_DEFAULT_LD: (*nix only) the default linker for selected toolchain.
; SPC_EXTRA_PHP_VARS: (linux only) the extra vars for building php, used in `configure` and `make` command.
; * These vars are only be defined in LinuxBuilder and cannot be changed anywhere:
; SPC_LINUX_DEFAULT_CC: the default compiler for linux. (For alpine linux: `gcc`, default: `$GNU_ARCH-linux-musl-gcc`)
; SPC_LINUX_DEFAULT_CXX: the default c++ compiler for linux. (For alpine linux: `g++`, default: `$GNU_ARCH-linux-musl-g++`)
; SPC_LINUX_DEFAULT_AR: the default archiver for linux. (For alpine linux: `ar`, default: `$GNU_ARCH-linux-musl-ar`)
; SPC_EXTRA_PHP_VARS: the extra vars for building php, used in `configure` and `make` command.
[global]
; Build concurrency for make -jN, default is CPU_COUNT, this value are used in every libs.
@@ -46,15 +44,9 @@ SPC_SKIP_PHP_VERSION_CHECK="no"
; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed")
SPC_SKIP_DOCTOR_CHECK_ITEMS=""
; extra modules that xcaddy will include in the FrankenPHP build
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli"
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/frankenphp/caddy --with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli"
; The display message for php version output (PHP >= 8.4 available)
PHP_BUILD_PROVIDER="StaticPHP ${SPC_VERSION}"
; Whether to enable log file (if you are using vendor mode)
SPC_ENABLE_LOG_FILE="yes"
; The LOG DIR for spc logs
SPC_LOGS_DIR="${WORKING_DIR}/log"
; Preserve old logs when running new builds
SPC_PRESERVE_LOGS="no"
PHP_BUILD_PROVIDER="static-php-cli ${SPC_VERSION}"
; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them
; only useful for builds targeting not pure-static linking
@@ -68,8 +60,8 @@ SPC_PRESERVE_LOGS="no"
[windows]
; build target: win7-static
SPC_TARGET=native-windows
; MSYS2 root directory (msys64 subfolder), used by the Windows toolchain
SPC_MSYS2_PATH="${PKG_ROOT_PATH}\msys2-build-essentials\msys64"
; php-sdk-binary-tools path
PHP_SDK_PATH="${WORKING_DIR}\php-sdk-binary-tools"
; upx executable path
UPX_EXEC="${PKG_ROOT_PATH}\bin\upx.exe"
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
@@ -82,10 +74,8 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
; - musl-native: used for alpine linux, can build `musl` and `musl -dynamic` target.
; - 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
; uncomment to link libc dynamically on musl
; SPC_MUSL_DYNAMIC=true
; LEGACY option to specify the target
SPC_LIBC=musl
; Recommended: specify your target here. Zig toolchain will be used.
; examples:
@@ -94,17 +84,17 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
; `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=${GNU_ARCH}-linux-musl
; SPC_TARGET=
; 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}
; compiler environments
CC=${SPC_LINUX_DEFAULT_CC}
CXX=${SPC_LINUX_DEFAULT_CXX}
AR=${SPC_LINUX_DEFAULT_AR}
LD=${SPC_LINUX_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_CFLAGS="-fPIC -O3 -pipe -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
SPC_DEFAULT_LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,-z,noexecstack -Wl,--gc-sections"
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
SPC_DEFAULT_LD_FLAGS=""
; upx executable path
UPX_EXEC=${PKG_ROOT_PATH}/bin/upx
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
@@ -114,37 +104,31 @@ SPC_MICRO_PATCHES=cli_checks,disable_huge_page
; buildconf command
SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
; configure command
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --enable-rtld-now --enable-re2c-cgoto --disable-rpath --with-pic"
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --with-pic"
; *** default build vars for building php ***
; embed type for php, static (libphp.a) or shared (libphp.so)
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
; EXTRA_CFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CFLAGS}"
; EXTRA_CXXFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CXXFLAGS}"
; CFLAGS for configuring php
SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -fPIE"
; EXTRA_CFLAGS for `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE ${SPC_DEFAULT_C_FLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; optional, path to openssl conf. This affects where openssl will look for the default CA.
; default on Debian/Alpine: /etc/ssl, default on RHEL: /etc/pki/tls
OPENSSLDIR=""
[macos]
; 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
; Whether to use brew version of llvm or system version (valid options: 'system', 'brew', default: 'system')
SPC_USE_LLVM=system
; 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}
; compiler environments
CC=clang
CXX=clang++
AR=ar
LD=ld
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
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_LDFLAGS="-Wl,-dead_strip"
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
SPC_DEFAULT_LD_FLAGS=""
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
SPC_MICRO_PATCHES=cli_checks,macos_iconv
@@ -152,16 +136,17 @@ SPC_MICRO_PATCHES=cli_checks,macos_iconv
; buildconf command
SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
; configure command
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-phpdbg --enable-rtld-now --enable-re2c-cgoto --disable-rpath --with-pic"
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-phpdbg"
; *** default build vars for building php ***
; embed type for php, static (libphp.a) or shared (libphp.dylib)
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
; EXTRA_CFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -fvisibility=hidden -fvisibility-inlines-hidden -Werror=unknown-warning-option ${SPC_DEFAULT_CFLAGS}"
; EXTRA_CXXFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fpie -fvisibility=hidden -fvisibility-inlines-hidden -Werror=unknown-warning-option ${SPC_DEFAULT_CXXFLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.dylib
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; minimum compatible macOS version (LLVM vars, availability not guaranteed)
MACOSX_DEPLOYMENT_TARGET=12.0
; CFLAGS for configuring php
SPC_CMD_VAR_PHP_CONFIGURE_CFLAGS="${SPC_DEFAULT_C_FLAGS} -Werror=unknown-warning-option"
; EXTRA_CFLAGS for `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie ${SPC_DEFAULT_C_FLAGS}"
[freebsd]
; compiler environments
CC=clang
CXX=clang++

1221
config/ext.json Normal file

File diff suppressed because it is too large Load Diff

969
config/lib.json Normal file
View File

@@ -0,0 +1,969 @@
{
"lib-base": {
"type": "root"
},
"php": {
"type": "root",
"source": "php-src",
"lib-depends": [
"lib-base",
"micro"
],
"lib-depends-macos": [
"lib-base",
"micro",
"libxml2"
],
"lib-suggests-linux": [
"libacl",
"brotli",
"watcher"
],
"lib-suggests-macos": [
"brotli",
"watcher"
]
},
"micro": {
"type": "target",
"source": "micro"
},
"pkg-config": {
"type": "package",
"source": "pkg-config",
"bin-unix": [
"pkg-config"
]
},
"attr": {
"source": "attr",
"static-libs-unix": [
"libattr.a"
]
},
"brotli": {
"source": "brotli",
"pkg-configs": [
"libbrotlicommon",
"libbrotlidec",
"libbrotlienc"
],
"static-libs-windows": [
"brotlicommon.lib",
"brotlienc.lib",
"brotlidec.lib"
],
"headers": [
"brotli"
]
},
"bzip2": {
"source": "bzip2",
"static-libs-unix": [
"libbz2.a"
],
"static-libs-windows": [
"libbz2.lib",
"libbz2_a.lib"
],
"headers": [
"bzlib.h"
]
},
"curl": {
"source": "curl",
"static-libs-unix": [
"libcurl.a"
],
"static-libs-windows": [
"libcurl_a.lib"
],
"headers": [
"curl"
],
"lib-depends-unix": [
"openssl",
"zlib"
],
"lib-depends-windows": [
"zlib",
"libssh2",
"nghttp2"
],
"lib-suggests-unix": [
"libssh2",
"brotli",
"nghttp2",
"nghttp3",
"ngtcp2",
"zstd",
"libcares",
"ldap"
],
"lib-suggests-windows": [
"brotli",
"zstd"
],
"frameworks": [
"CoreFoundation",
"CoreServices",
"SystemConfiguration"
]
},
"fastlz": {
"source": "fastlz",
"static-libs-unix": [
"libfastlz.a"
],
"headers": [
"fastlz/fastlz.h"
]
},
"freetype": {
"source": "freetype",
"static-libs-unix": [
"libfreetype.a"
],
"static-libs-windows": [
"libfreetype_a.lib"
],
"headers-unix": [
"freetype2/freetype/freetype.h",
"freetype2/ft2build.h"
],
"lib-depends": [
"zlib"
],
"lib-suggests": [
"libpng",
"bzip2",
"brotli"
]
},
"gettext": {
"source": "gettext",
"static-libs-unix": [
"libintl.a"
],
"lib-depends": [
"libiconv"
],
"lib-suggests": [
"ncurses",
"libxml2"
],
"frameworks": [
"CoreFoundation"
]
},
"glfw": {
"source": "ext-glfw",
"static-libs-unix": [
"libglfw3.a"
],
"frameworks": [
"CoreVideo",
"OpenGL",
"Cocoa",
"IOKit"
]
},
"gmp": {
"source": "gmp",
"static-libs-unix": [
"libgmp.a"
],
"static-libs-windows": [
"libgmp.lib"
],
"headers": [
"gmp.h"
]
},
"gmssl": {
"source": "gmssl",
"static-libs-unix": [
"libgmssl.a"
],
"static-libs-windows": [
"gmssl.lib"
],
"frameworks": [
"Security"
]
},
"grpc": {
"source": "grpc",
"pkg-configs": [
"grpc"
],
"lib-depends": [
"zlib",
"openssl",
"libcares"
],
"cpp-library": true,
"frameworks": [
"CoreFoundation"
]
},
"icu": {
"source": "icu",
"cpp-library": true,
"pkg-configs": [
"icu-uc",
"icu-i18n",
"icu-io"
]
},
"icu-static-win": {
"source": "icu-static-win",
"static-libs-windows": [
"icudt.lib",
"icuin.lib",
"icuio.lib",
"icuuc.lib"
],
"headers-windows": [
"unicode"
]
},
"imagemagick": {
"source": "imagemagick",
"cpp-library": true,
"pkg-configs": [
"Magick++-7.Q16HDRI",
"MagickCore-7.Q16HDRI",
"MagickWand-7.Q16HDRI"
],
"lib-depends": [
"zlib",
"libjpeg",
"libjxl",
"libpng",
"libwebp",
"freetype",
"libtiff",
"libheif",
"bzip2"
],
"lib-suggests": [
"zstd",
"xz",
"libzip",
"libxml2"
]
},
"imap": {
"source": "imap",
"static-libs-unix": [
"libc-client.a"
],
"lib-suggests": [
"openssl"
]
},
"jbig": {
"source": "jbig",
"static-libs-unix": [
"libjbig.a",
"libjbig85.a"
],
"headers": [
"jbig.h",
"jbig85.h",
"jbig_ar.h"
]
},
"ldap": {
"source": "ldap",
"pkg-configs": [
"ldap",
"lber"
],
"lib-depends": [
"openssl",
"zlib",
"gmp",
"libsodium"
]
},
"lerc": {
"source": "lerc",
"static-libs-unix": [
"libLerc.a"
],
"cpp-library": true
},
"libacl": {
"source": "libacl",
"static-libs-unix": [
"libacl.a"
],
"lib-depends": [
"attr"
]
},
"libaom": {
"source": "libaom",
"static-libs-unix": [
"libaom.a"
],
"cpp-library": true
},
"libargon2": {
"source": "libargon2",
"static-libs-unix": [
"libargon2.a"
]
},
"libavif": {
"source": "libavif",
"static-libs-unix": [
"libavif.a"
],
"static-libs-windows": [
"avif.lib"
]
},
"libcares": {
"source": "libcares",
"static-libs-unix": [
"libcares.a"
],
"headers-unix": [
"ares.h",
"ares_dns.h",
"ares_nameser.h"
]
},
"libde265": {
"source": "libde265",
"static-libs-unix": [
"libde265.a"
],
"cpp-library": true
},
"libedit": {
"source": "libedit",
"static-libs-unix": [
"libedit.a"
],
"lib-depends": [
"ncurses"
]
},
"libevent": {
"source": "libevent",
"static-libs-unix": [
"libevent.a",
"libevent_core.a",
"libevent_extra.a",
"libevent_openssl.a"
],
"lib-depends": [
"openssl"
]
},
"libffi": {
"source": "libffi",
"static-libs-unix": [
"libffi.a"
],
"static-libs-windows": [
"libffi.lib"
],
"headers-unix": [
"ffi.h",
"ffitarget.h"
],
"headers-windows": [
"ffi.h",
"fficonfig.h",
"ffitarget.h"
]
},
"libffi-win": {
"source": "libffi-win",
"static-libs-windows": [
"libffi.lib"
],
"headers-windows": [
"ffi.h",
"ffitarget.h",
"fficonfig.h"
]
},
"libheif": {
"source": "libheif",
"static-libs-unix": [
"libheif.a"
],
"lib-depends": [
"libde265",
"libwebp",
"libaom",
"zlib",
"brotli"
]
},
"libiconv": {
"source": "libiconv",
"static-libs-unix": [
"libiconv.a",
"libcharset.a"
],
"headers": [
"iconv.h",
"libcharset.h",
"localcharset.h"
]
},
"libiconv-win": {
"source": "libiconv-win",
"static-libs-windows": [
"libiconv.lib",
"libiconv_a.lib"
]
},
"libjpeg": {
"source": "libjpeg",
"static-libs-unix": [
"libjpeg.a",
"libturbojpeg.a"
],
"static-libs-windows": [
"libjpeg_a.lib"
],
"lib-suggests-windows": [
"zlib"
]
},
"libjxl": {
"source": "libjxl",
"pkg-configs": [
"libjxl",
"libjxl_cms",
"libjxl_threads",
"libhwy"
],
"lib-depends": [
"brotli",
"libjpeg",
"libpng",
"libwebp"
]
},
"liblz4": {
"source": "liblz4",
"static-libs-unix": [
"liblz4.a"
]
},
"libmemcached": {
"source": "libmemcached",
"cpp-library": true,
"static-libs-unix": [
"libmemcached.a",
"libmemcachedprotocol.a",
"libmemcachedutil.a",
"libhashkit.a"
]
},
"libpng": {
"source": "libpng",
"static-libs-unix": [
"libpng16.a"
],
"static-libs-windows": [
"libpng16_static.lib",
"libpng_a.lib"
],
"headers-unix": [
"png.h",
"pngconf.h",
"pnglibconf.h"
],
"headers-windows": [
"png.h",
"pngconf.h"
],
"lib-depends": [
"zlib"
]
},
"librabbitmq": {
"source": "librabbitmq",
"static-libs-unix": [
"librabbitmq.a"
],
"static-libs-windows": [
"rabbitmq.4.lib"
],
"lib-depends": [
"openssl"
]
},
"librdkafka": {
"source": "librdkafka",
"static-libs-unix": [
"librdkafka.a",
"librdkafka++.a",
"librdkafka-static.a"
],
"cpp-library": true,
"lib-suggests": [
"zstd"
]
},
"libsodium": {
"source": "libsodium",
"static-libs-unix": [
"libsodium.a"
],
"static-libs-windows": [
"libsodium.lib"
]
},
"libssh2": {
"source": "libssh2",
"static-libs-unix": [
"libssh2.a"
],
"static-libs-windows": [
"libssh2.lib"
],
"headers": [
"libssh2.h",
"libssh2_publickey.h",
"libssh2_sftp.h"
],
"lib-depends": [
"openssl"
]
},
"libtiff": {
"source": "libtiff",
"static-libs-unix": [
"libtiff.a"
],
"lib-depends": [
"zlib",
"libjpeg"
],
"lib-suggests-unix": [
"lerc",
"libwebp",
"jbig",
"xz",
"zstd"
]
},
"liburing": {
"source": "liburing",
"pkg-configs": [
"liburing",
"liburing-ffi"
],
"static-libs-linux": [
"liburing.a",
"liburing-ffi.a"
],
"headers-linux": [
"liburing/",
"liburing.h"
]
},
"libuuid": {
"source": "libuuid",
"static-libs-unix": [
"libuuid.a"
],
"headers": [
"uuid/uuid.h"
]
},
"libuv": {
"source": "libuv",
"static-libs-unix": [
"libuv.a"
]
},
"libwebp": {
"source": "libwebp",
"pkg-configs": [
"libwebp",
"libwebpdecoder",
"libwebpdemux",
"libwebpmux",
"libsharpyuv"
],
"static-libs-windows": [
"libwebp.lib",
"libwebpdecoder.lib",
"libwebpdemux.lib",
"libsharpyuv.lib"
]
},
"libxml2": {
"source": "libxml2",
"pkg-configs": [
"libxml-2.0"
],
"static-libs-windows": [
"libxml2s.lib",
"libxml2_a.lib"
],
"headers": [
"libxml2"
],
"lib-depends-unix": [
"libiconv"
],
"lib-suggests-unix": [
"xz",
"zlib"
],
"lib-depends-windows": [
"libiconv-win"
],
"lib-suggests-windows": [
"zlib"
]
},
"libxslt": {
"source": "libxslt",
"static-libs-unix": [
"libxslt.a",
"libexslt.a"
],
"lib-depends": [
"libxml2"
]
},
"libyaml": {
"source": "libyaml",
"static-libs-unix": [
"libyaml.a"
],
"static-libs-windows": [
"yaml.lib"
],
"headers": [
"yaml.h"
]
},
"libzip": {
"source": "libzip",
"static-libs-unix": [
"libzip.a"
],
"static-libs-windows": [
"zip.lib",
"libzip_a.lib"
],
"headers": [
"zip.h",
"zipconf.h"
],
"lib-depends-unix": [
"zlib"
],
"lib-suggests-unix": [
"bzip2",
"xz",
"zstd",
"openssl"
],
"lib-depends-windows": [
"zlib",
"bzip2",
"xz"
],
"lib-suggests-windows": [
"zstd",
"openssl"
]
},
"mimalloc": {
"source": "mimalloc",
"static-libs-unix": [
"libmimalloc.a"
]
},
"ncurses": {
"source": "ncurses",
"static-libs-unix": [
"libncurses.a"
]
},
"net-snmp": {
"source": "net-snmp",
"pkg-configs": [
"netsnmp",
"netsnmp-agent"
],
"lib-depends": [
"openssl",
"zlib"
]
},
"nghttp2": {
"source": "nghttp2",
"static-libs-unix": [
"libnghttp2.a"
],
"static-libs-windows": [
"nghttp2.lib"
],
"headers": [
"nghttp2"
],
"lib-depends": [
"zlib",
"openssl"
],
"lib-suggests": [
"libxml2",
"nghttp3",
"ngtcp2"
]
},
"nghttp3": {
"source": "nghttp3",
"static-libs-unix": [
"libnghttp3.a"
],
"static-libs-windows": [
"nghttp3.lib"
],
"headers": [
"nghttp3"
],
"lib-depends": [
"openssl"
]
},
"ngtcp2": {
"source": "ngtcp2",
"static-libs-unix": [
"libngtcp2.a",
"libngtcp2_crypto_ossl.a"
],
"static-libs-windows": [
"ngtcp2.lib",
"ngtcp2_crypto_ossl.lib"
],
"headers": [
"ngtcp2"
],
"lib-depends": [
"openssl"
],
"lib-suggests": [
"nghttp3",
"brotli"
]
},
"onig": {
"source": "onig",
"static-libs-unix": [
"libonig.a"
],
"static-libs-windows": [
"onig.lib",
"onig_a.lib"
],
"headers": [
"oniggnu.h",
"oniguruma.h"
]
},
"openssl": {
"source": "openssl",
"static-libs-unix": [
"libssl.a",
"libcrypto.a"
],
"static-libs-windows": [
"libssl.lib",
"libcrypto.lib"
],
"headers": [
"openssl"
],
"lib-depends": [
"zlib"
]
},
"postgresql": {
"source": "postgresql",
"pkg-configs": [
"libpq"
],
"lib-depends": [
"libiconv",
"libxml2",
"openssl",
"zlib",
"libedit"
],
"lib-suggests": [
"icu",
"libxslt",
"ldap",
"zstd"
]
},
"postgresql-win": {
"source": "postgresql-win",
"static-libs": [
"libpq.lib",
"libpgport.lib",
"libpgcommon.lib"
]
},
"pthreads4w": {
"source": "pthreads4w",
"static-libs-windows": [
"libpthreadVC3.lib"
]
},
"qdbm": {
"source": "qdbm",
"static-libs-unix": [
"libqdbm.a"
],
"static-libs-windows": [
"qdbm_a.lib"
],
"headers-windows": [
"depot.h"
]
},
"re2c": {
"source": "re2c",
"bin-unix": [
"re2c"
]
},
"readline": {
"source": "readline",
"static-libs-unix": [
"libreadline.a"
],
"lib-depends": [
"ncurses"
]
},
"snappy": {
"source": "snappy",
"cpp-library": true,
"static-libs-unix": [
"libsnappy.a"
],
"headers-unix": [
"snappy.h",
"snappy-c.h",
"snappy-sinksource.h",
"snappy-stubs-public.h"
],
"lib-depends": [
"zlib"
]
},
"sqlite": {
"source": "sqlite",
"static-libs-unix": [
"libsqlite3.a"
],
"static-libs-windows": [
"libsqlite3_a.lib"
],
"headers": [
"sqlite3.h",
"sqlite3ext.h"
]
},
"tidy": {
"source": "tidy",
"static-libs-unix": [
"libtidy.a"
]
},
"unixodbc": {
"source": "unixodbc",
"static-libs-unix": [
"libodbc.a",
"libodbccr.a",
"libodbcinst.a"
],
"lib-depends": [
"libiconv"
]
},
"watcher": {
"source": "watcher",
"cpp-library": true,
"static-libs-unix": [
"libwatcher-c.a"
],
"headers": [
"wtr/watcher-c.h"
]
},
"xz": {
"source": "xz",
"static-libs-unix": [
"liblzma.a"
],
"static-libs-windows": [
"lzma.lib",
"liblzma_a.lib"
],
"headers-unix": [
"lzma"
],
"headers-windows": [
"lzma",
"lzma.h"
],
"lib-depends-unix": [
"libiconv"
]
},
"zlib": {
"source": "zlib",
"static-libs-unix": [
"libz.a"
],
"static-libs-windows": [
"zlib_a.lib"
],
"headers": [
"zlib.h",
"zconf.h"
]
},
"zstd": {
"source": "zstd",
"static-libs-unix": [
"libzstd.a"
],
"static-libs-windows": [
[
"zstd.lib",
"zstd_static.lib"
]
],
"headers-unix": [
"zdict.h",
"zstd.h",
"zstd_errors.h"
],
"headers-windows": [
"zstd.h",
"zstd_errors.h"
]
}
}

105
config/pkg.json Normal file
View File

@@ -0,0 +1,105 @@
{
"go-xcaddy-aarch64-linux": {
"type": "custom"
},
"go-xcaddy-aarch64-macos": {
"type": "custom"
},
"go-xcaddy-x86_64-linux": {
"type": "custom"
},
"go-xcaddy-x86_64-macos": {
"type": "custom"
},
"musl-toolchain-aarch64-linux": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/musl-toolchain/aarch64-musl-toolchain.tgz"
},
"musl-toolchain-x86_64-linux": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/musl-toolchain/x86_64-musl-toolchain.tgz"
},
"nasm-x86_64-win": {
"type": "url",
"url": "https://dl.static-php.dev/static-php-cli/deps/nasm/nasm-2.16.01-win64.zip",
"extract-files": {
"nasm.exe": "{php_sdk_path}/bin/nasm.exe",
"ndisasm.exe": "{php_sdk_path}/bin/ndisasm.exe"
}
},
"pkg-config-aarch64-linux": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-aarch64-linux-musl-1.2.5.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-aarch64-macos": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-aarch64-darwin.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-x86_64-linux": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-x86_64-linux-musl-1.2.5.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"pkg-config-x86_64-macos": {
"type": "ghrel",
"repo": "static-php/static-php-cli-hosted",
"match": "pkg-config-x86_64-darwin.txz",
"extract-files": {
"bin/pkg-config": "{pkg_root_path}/bin/pkg-config"
}
},
"strawberry-perl-x86_64-win": {
"type": "url",
"url": "https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_5380_5361/strawberry-perl-5.38.0.1-64bit-portable.zip"
},
"upx-aarch64-linux": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-arm64_linux\\.tar\\.xz",
"extract-files": {
"upx": "{pkg_root_path}/bin/upx"
}
},
"upx-x86_64-linux": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-amd64_linux\\.tar\\.xz",
"extract-files": {
"upx": "{pkg_root_path}/bin/upx"
}
},
"upx-x86_64-win": {
"type": "ghrel",
"repo": "upx/upx",
"match": "upx.+-win64\\.zip",
"extract-files": {
"upx.exe": "{pkg_root_path}/bin/upx.exe"
}
},
"zig-aarch64-linux": {
"type": "custom"
},
"zig-aarch64-macos": {
"type": "custom"
},
"zig-x86_64-linux": {
"type": "custom"
},
"zig-x86_64-macos": {
"type": "custom"
},
"zig-x86_64-win": {
"type": "custom"
}
}

View File

@@ -1,380 +0,0 @@
ext-bcmath:
type: php-extension
ext-bz2:
type: php-extension
depends:
- bzip2
php-extension:
arg-type@unix: with-path
arg-type@windows: with
ext-calendar:
type: php-extension
ext-com_dotnet:
type: php-extension
php-extension:
os:
- Windows
arg-type@windows: '--enable-com-dotnet=yes'
ext-ctype:
type: php-extension
ext-curl:
type: php-extension
depends:
- curl
depends@windows:
- curl
- ext-zlib
- ext-openssl
php-extension:
arg-type: with
ext-dba:
type: php-extension
suggests:
- qdbm
php-extension:
arg-type: custom
ext-dom:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type: enable
arg-type@windows: with
ext-exif:
type: php-extension
depends@windows:
- ext-mbstring
ext-ffi:
type: php-extension
depends@unix:
- libffi
depends@windows:
- libffi-win
php-extension:
arg-type@unix: '--with-ffi=@shared_suffix@ --enable-zend-signals'
arg-type@windows: with
ext-fileinfo:
type: php-extension
ext-filter:
type: php-extension
ext-ftp:
type: php-extension
suggests:
- ext-openssl
ext-gd:
type: php-extension
depends:
- zlib
- libpng
- ext-zlib
suggests:
- libavif
- libwebp
- libjpeg
- freetype
php-extension:
arg-type: custom
arg-type@windows: with
ext-gettext:
type: php-extension
depends@unix:
- gettext
depends@windows:
- gettext-win
php-extension:
arg-type: with-path
arg-type@windows: with
ext-gmp:
type: php-extension
depends@unix:
- gmp
depends@windows:
- mpir
php-extension:
arg-type: with-path
arg-type@windows: with
ext-iconv:
type: php-extension
depends@unix:
- libiconv
depends@windows:
- libiconv-win
php-extension:
arg-type@unix: with-path
arg-type@windows: with
ext-intl:
type: php-extension
depends:
- icu
ext-ldap:
type: php-extension
depends:
- ldap
suggests:
- gmp
- libsodium
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: with-path
arg-type@windows: with
ext-libxml:
type: php-extension
depends:
- libxml2
php-extension:
build-with-php: true
build-shared: false
arg-type@unix: with-path
arg-type@windows: with
ext-mbregex:
type: php-extension
depends:
- onig
- ext-mbstring
php-extension:
arg-type: custom
build-shared: false
build-static: true
display-name: mbstring
ext-mbstring:
type: php-extension
php-extension:
arg-type: custom
ext-mysqli:
type: php-extension
depends:
- ext-mysqlnd
php-extension:
arg-type: with
build-with-php: true
ext-mysqlnd:
type: php-extension
depends:
- zlib
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-odbc:
type: php-extension
depends@unix:
- unixodbc
php-extension:
arg-type@unix: '--with-unixODBC@shared_path_suffix@'
arg-type@windows: enable
ext-opcache:
type: php-extension
php-extension:
arg-type@unix: custom
arg-type@windows: enable
zend-extension: true
display-name: 'Zend Opcache'
ext-openssl:
type: php-extension
depends:
- openssl
- zlib
- ext-zlib
php-extension:
arg-type: custom
arg-type@windows: with
build-with-php: true
ext-password-argon2:
type: php-extension
depends:
- libargon2
suggests:
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: custom
display-name: ''
ext-pcntl:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-pdo:
type: php-extension
ext-pdo_mysql:
type: php-extension
depends:
- ext-pdo
- ext-mysqlnd
php-extension:
arg-type: with
ext-pdo_odbc:
type: php-extension
depends:
- ext-pdo
depends@unix:
- unixodbc
- ext-pdo
- ext-odbc
php-extension:
arg-type: custom
ext-pdo_pgsql:
type: php-extension
depends:
- ext-pdo
- ext-pgsql
- postgresql
php-extension:
arg-type@unix: with-path
arg-type@windows: '--with-pdo-pgsql=yes'
ext-pdo_sqlite:
type: php-extension
depends:
- ext-pdo
- ext-sqlite3
- sqlite
php-extension:
arg-type: with
ext-pgsql:
type: php-extension
depends:
- postgresql
php-extension:
arg-type: custom
ext-phar:
type: php-extension
depends:
- zlib
ext-posix:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-readline:
type: php-extension
depends@unix:
- libedit
depends@windows:
- wineditline
php-extension:
arg-type: '--with-libedit --without-readline'
arg-type@windows: with
build-shared: false
build-static: true
ext-session:
type: php-extension
ext-shmop:
type: php-extension
php-extension:
build-with-php: true
ext-simplexml:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-snmp:
type: php-extension
depends:
- net-snmp
php-extension:
os:
- Linux
- Darwin
arg-type: with
ext-soap:
type: php-extension
depends:
- ext-xml
- ext-session
php-extension:
arg-type: enable
build-with-php: true
ext-sockets:
type: php-extension
ext-sodium:
type: php-extension
depends:
- libsodium
php-extension:
arg-type: with
ext-sqlite3:
type: php-extension
depends:
- sqlite
php-extension:
arg-type@unix: with-path
arg-type@windows: with
build-with-php: true
ext-sysvmsg:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-sysvsem:
type: php-extension
php-extension:
os:
- Linux
- Darwin
ext-sysvshm:
type: php-extension
ext-tidy:
type: php-extension
depends:
- tidy
php-extension:
arg-type: with-path
ext-tokenizer:
type: php-extension
php-extension:
build-with-php: true
ext-xml:
type: php-extension
depends:
- ext-libxml
depends@windows:
- ext-iconv
- ext-libxml
php-extension:
arg-type@unix: enable
arg-type@windows: with
build-with-php: true
ext-xmlreader:
type: php-extension
depends:
- ext-xml
- ext-dom
php-extension:
arg-type: enable
build-with-php: true
ext-xmlwriter:
type: php-extension
depends:
- ext-xml
php-extension:
arg-type: enable
build-with-php: true
ext-xsl:
type: php-extension
depends:
- libxslt
- ext-xml
- ext-dom
php-extension:
arg-type: with-path
build-with-php: true
ext-zlib:
type: php-extension
depends:
- zlib
php-extension:
arg-type: custom
arg-type@windows: enable
build-with-php: true
build-shared: false

View File

@@ -1,17 +0,0 @@
ext-amqp:
type: php-extension
artifact:
source:
type: pecl
name: amqp
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- librabbitmq
depends@windows:
- librabbitmq
- ext-openssl
php-extension:
arg-type: '--with-amqp@shared_suffix@ --with-librabbitmq-dir=@build_root_path@'
arg-type@windows: '--with-amqp'

View File

@@ -1,9 +0,0 @@
ext-apcu:
type: php-extension
artifact:
source:
type: pecl
name: APCu
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -1,9 +0,0 @@
ext-ast:
type: php-extension
artifact:
source:
type: pecl
name: ast
metadata:
license-files: [LICENSE]
license: BSD-3-Clause

View File

@@ -1,13 +0,0 @@
ext-brotli:
type: php-extension
artifact:
source:
type: git
extract: php-src/ext/brotli
rev: master
url: 'https://github.com/kjdev/php-ext-brotli'
metadata:
license-files: [LICENSE]
license: MIT
depends:
- brotli

View File

@@ -1,19 +0,0 @@
ext-clickhouse:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/php_clickhouse
extract: php-src/ext/clickhouse
prefer-stable: true
metadata:
license-files: [LICENSE]
license: PHP-3.01
suggests@unix:
- openssl
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type@unix: custom

View File

@@ -1,16 +0,0 @@
ext-decimal:
type: php-extension
artifact:
source:
type: ghtagtar
repo: php-decimal/ext-decimal
match: 'v2\.\d.*'
extract: php-src/ext/decimal
metadata:
license-files: [LICENSE]
license: MIT
depends:
- libmpdec
php-extension:
arg-type@unix: '--enable-decimal --with-libmpdec-path=@build_root_path@'
arg-type@windows: '--with-decimal'

View File

@@ -1,10 +0,0 @@
ext-deepclone:
type: php-extension
artifact:
source:
type: ghtagtar
repo: symfony/php-ext-deepclone
extract: php-src/ext/deepclone
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -1,9 +0,0 @@
ext-dio:
type: php-extension
artifact:
source:
type: pecl
name: dio
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -1,11 +0,0 @@
ext-ds:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/php-ds/ext-ds.git'
rev: master
extract: php-src/ext/ds
metadata:
license-files: [LICENSE]
license: MIT

View File

@@ -1,13 +0,0 @@
ext-ev:
type: php-extension
artifact:
source:
type: pecl
name: ev
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- ext-sockets
php-extension:
arg-type@windows: with

View File

@@ -1,20 +0,0 @@
ext-event:
type: php-extension
artifact:
source:
type: url
url: 'https://bitbucket.org/osmanov/pecl-event/get/3.1.4.tar.gz'
extract: php-src/ext/event
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libevent
- ext-openssl
suggests:
- ext-sockets
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -1,13 +0,0 @@
ext-excimer:
type: php-extension
artifact:
source:
type: pecl
name: excimer
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
os:
- Linux
- Darwin

View File

@@ -1,20 +0,0 @@
ext-fastchart:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastchart
extract: php-src/ext/fastchart
prefer-stable: true
metadata:
license-files: [LICENSE]
depends:
- freetype
suggests:
- libpng
- libjpeg
- libwebp
php-extension:
os:
- Linux
- Darwin

View File

@@ -1,14 +0,0 @@
ext-fastjson:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastjson
extract: php-src/ext/fastjson
prefer-stable: true
metadata:
license-files: [LICENSE]
php-extension:
os:
- Linux
- Darwin

View File

@@ -1,16 +0,0 @@
ext-gearman:
type: php-extension
artifact:
source:
type: pecl
name: gearman
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libgearman
php-extension:
os:
- Linux
- Darwin
arg-type: '--with-gearman@shared_path_suffix@'

View File

@@ -1,7 +0,0 @@
ext-glfw:
type: php-extension
artifact: glfw
depends:
- glfw
php-extension:
arg-type@unix: '--enable-glfw --with-glfw-dir=@build_root_path@'

View File

@@ -1,14 +0,0 @@
ext-gmssl:
type: php-extension
artifact:
source:
type: ghtar
repo: gmssl/GmSSL-PHP
extract: php-src/ext/gmssl
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- gmssl
php-extension:
arg-type: with-path

View File

@@ -1,17 +0,0 @@
ext-grpc:
type: php-extension
artifact:
source:
type: pecl
name: grpc
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- grpc
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type@unix: enable-path

View File

@@ -1,12 +0,0 @@
ext-igbinary:
type: php-extension
artifact:
source:
type: pecl
name: igbinary
metadata:
license-files: [COPYING]
license: BSD-3-Clause
suggests:
- ext-session
- ext-apcu

View File

@@ -1,16 +0,0 @@
ext-imagick:
type: php-extension
artifact:
source:
type: pecl
name: imagick
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- imagemagick
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -1,18 +0,0 @@
ext-imap:
type: php-extension
artifact:
source:
type: pecl
name: imap
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- imap
suggests:
- ext-openssl
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -1,12 +0,0 @@
ext-inotify:
type: php-extension
artifact:
source:
type: pecl
name: inotify
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
os:
- Linux

View File

@@ -1,16 +0,0 @@
ext-lz4:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-lz4.git'
rev: master
extract: php-src/ext/lz4
metadata:
license-files: [LICENSE]
license: MIT
depends:
- liblz4
php-extension:
arg-type@unix: '--enable-lz4=@shared_suffix@ --with-lz4-includedir=@build_root_path@'
arg-type@windows: '--enable-lz4'

View File

@@ -1,13 +0,0 @@
ext-maxminddb:
type: php-extension
artifact:
source:
type: pecl
name: maxminddb
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- libmaxminddb
php-extension:
arg-type: with

View File

@@ -1,17 +0,0 @@
ext-memcache:
type: php-extension
artifact:
source:
type: pecl
name: memcache
metadata:
license-files: [LICENSE]
license: PHP-3.0
depends:
- ext-zlib
- ext-session
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-memcache@shared_suffix@ --with-zlib-dir=@build_root_path@'

View File

@@ -1,26 +0,0 @@
ext-memcached:
type: php-extension
artifact:
source:
type: pecl
name: memcached
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libmemcached
depends@unix:
- libmemcached
- fastlz
- ext-session
- ext-zlib
suggests:
- zstd
- ext-igbinary
- ext-msgpack
- ext-session
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-memcached@shared_suffix@ --with-zlib-dir=@build_root_path@'

View File

@@ -1,24 +0,0 @@
ext-mongodb:
type: php-extension
artifact:
source:
type: ghrel
repo: mongodb/mongo-php-driver
match: mongodb.+\.tgz
extract: php-src/ext/mongodb
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@windows:
- ext-openssl
suggests@unix:
- icu
- openssl
- zstd
- zlib
frameworks:
- CoreFoundation
- Security
php-extension:
arg-type@unix: custom
arg-type@windows: '--enable-mongodb --with-mongodb-client-side-encryption'

View File

@@ -1,14 +0,0 @@
ext-msgpack:
type: php-extension
artifact:
source:
type: pecl
name: msgpack
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-session
php-extension:
arg-type@unix: with
arg-type@windows: enable

View File

@@ -1,18 +0,0 @@
ext-mysqlnd_ed25519:
type: php-extension
artifact:
source:
type: pie
repo: mariadb/mysqlnd_ed25519
extract: php-src/ext/mysqlnd_ed25519
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-mysqlnd
- libsodium
suggests:
- openssl
php-extension:
arg-type: '--with-mysqlnd_ed25519=@shared_suffix@'
build-static: false

View File

@@ -1,17 +0,0 @@
ext-mysqlnd_parsec:
type: php-extension
artifact:
source:
type: pie
repo: mariadb/mysqlnd_parsec
extract: php-src/ext/mysqlnd_parsec
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
depends:
- ext-mysqlnd
- libsodium
- openssl
php-extension:
arg-type: '--enable-mysqlnd_parsec'
build-static: false

View File

@@ -1,9 +0,0 @@
ext-opentelemetry:
type: php-extension
artifact:
source:
type: pecl
name: opentelemetry
metadata:
license-files: [LICENSE]
license: Apache-2.0

View File

@@ -1,13 +0,0 @@
ext-parallel:
type: php-extension
artifact:
source:
type: pecl
name: parallel
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@windows:
- pthreads4w
php-extension:
arg-type@windows: with

View File

@@ -1,12 +0,0 @@
ext-pcov:
type: php-extension
artifact:
source:
type: pecl
name: pcov
metadata:
license-files: [LICENSE]
license: PHP-3.01
php-extension:
build-static: false
build-shared: true

View File

@@ -1,14 +0,0 @@
ext-pdo_sqlsrv:
type: php-extension
artifact:
source:
type: pecl
name: pdo_sqlsrv
metadata:
license-files: [LICENSE]
license: MIT
depends:
- ext-pdo
- ext-sqlsrv
php-extension:
arg-type: with

View File

@@ -1,13 +0,0 @@
ext-protobuf:
type: php-extension
artifact:
source:
type: pecl
name: protobuf
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
php-extension:
os:
- Linux
- Darwin

View File

@@ -1,12 +0,0 @@
ext-rar:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/static-php/php-rar.git'
rev: issue-php82
extract: php-src/ext/rar
metadata:
license-files: [LICENSE]
license: PHP-3.01
lang: cpp

View File

@@ -1,18 +0,0 @@
ext-rdkafka:
type: php-extension
artifact:
source:
type: ghtar
repo: php-rdkafka/php-rdkafka
extract: php-src/ext/rdkafka
metadata:
license-files: [LICENSE]
license: MIT
depends:
- librdkafka
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type: custom

View File

@@ -1,21 +0,0 @@
ext-redis:
type: php-extension
artifact:
source:
type: pecl
name: redis
metadata:
license-files: [LICENSE]
license: PHP-3.01
suggests:
- ext-session
- ext-igbinary
- ext-msgpack
suggests@unix:
- ext-session
- ext-igbinary
- ext-msgpack
- zstd
- liblz4
php-extension:
arg-type: custom

View File

@@ -1,10 +0,0 @@
ext-simdjson:
type: php-extension
artifact:
source:
type: pecl
name: simdjson
metadata:
license-files: [LICENSE]
license: Apache-2.0
lang: cpp

View File

@@ -1,19 +0,0 @@
ext-snappy:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-snappy'
rev: master
extract: php-src/ext/snappy
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- snappy
suggests:
- ext-apcu
lang: cpp
php-extension:
arg-type@unix: '--enable-snappy --with-snappy-includedir=@build_root_path@'
arg-type@windows: '--enable-snappy'

View File

@@ -1,17 +0,0 @@
ext-spx:
type: php-extension
artifact:
source:
type: pie
repo: noisebynorthwest/php-spx
extract: php-src/ext/spx
metadata:
license-files: [LICENSE]
license: GPL-3.0-or-later
depends:
- ext-zlib
php-extension:
os:
- Linux
- Darwin
arg-type: '--enable-SPX@shared_suffix@'

View File

@@ -1,15 +0,0 @@
ext-sqlsrv:
type: php-extension
artifact:
source:
type: pecl
name: sqlsrv
metadata:
license-files: [LICENSE]
license: MIT
depends@linux:
- unixodbc
- ext-pcntl
depends@macos:
- unixodbc
lang: cpp

View File

@@ -1,15 +0,0 @@
ext-ssh2:
type: php-extension
artifact:
source:
type: pecl
name: ssh2
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libssh2
- ext-openssl
- ext-zlib
php-extension:
arg-type: with-path

View File

@@ -1,86 +0,0 @@
ext-swoole:
type: php-extension
artifact:
source:
type: ghtar
repo: swoole/swoole-src
extract: php-src/ext/swoole
prefer-stable: true
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- libcares
- brotli
- nghttp2
- zlib
- ext-openssl
- ext-curl
suggests:
- zstd
- ext-sockets
- ext-swoole-hook-pgsql
- ext-swoole-hook-mysql
- ext-swoole-hook-sqlite
- ext-swoole-hook-odbc
suggests@linux:
- zstd
- liburing
- ext-sockets
- ext-swoole-hook-pgsql
- ext-swoole-hook-mysql
- ext-swoole-hook-sqlite
- ext-swoole-hook-odbc
lang: cpp
php-extension:
os:
- Linux
- Darwin
arg-type: custom
ext-swoole-hook-mysql:
type: php-extension
depends:
- ext-mysqlnd
- ext-pdo
- ext-pdo_mysql
suggests:
- ext-mysqli
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-odbc:
type: php-extension
depends:
- ext-pdo
- unixodbc
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-pgsql:
type: php-extension
depends:
- ext-pgsql
- ext-pdo
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole
ext-swoole-hook-sqlite:
type: php-extension
depends:
- ext-sqlite3
- ext-pdo
php-extension:
os:
- Linux
- Darwin
arg-type: none
display-name: swoole

View File

@@ -1,19 +0,0 @@
ext-swow:
type: php-extension
artifact:
source:
extract: php-src/ext/swow-src
type: ghtar
repo: swow/swow
prefer-stable: true
metadata:
license: Apache-2.0
license-files: [LICENSE]
suggests:
- openssl
- curl
- ext-openssl
- ext-curl
- postgresql
php-extension:
arg-type: custom

View File

@@ -1,11 +0,0 @@
ext-trader:
type: php-extension
artifact:
source:
type: pecl
name: trader
metadata:
license-files: [LICENSE]
license: BSD-2-Clause
php-extension:
arg-type: enable

View File

@@ -1,16 +0,0 @@
ext-uuid:
type: php-extension
artifact:
source:
type: pecl
name: uuid
metadata:
license-files: [LICENSE]
license: LGPL-2.1-only
depends:
- libuuid
php-extension:
os:
- Linux
- Darwin
arg-type: with-path

View File

@@ -1,15 +0,0 @@
ext-uv:
type: php-extension
artifact:
source:
type: pecl
name: uv
prefer-stable: false
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libuv
- ext-sockets
php-extension:
arg-type: with-path

View File

@@ -1,17 +0,0 @@
ext-xdebug:
type: php-extension
artifact:
source:
type: pie
repo: xdebug/xdebug
metadata:
license-files: [LICENSE]
license: Xdebug-1.03
php-extension:
os:
- Linux
- Darwin
zend-extension: true
build-static: false
build-shared: true
build-with-php: false

View File

@@ -1,18 +0,0 @@
ext-xhprof:
type: php-extension
artifact:
source:
type: pecl
name: xhprof
extract: php-src/ext/xhprof-src
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- ext-ctype
php-extension:
os:
- Linux
- Darwin
arg-type: enable
build-with-php: true

View File

@@ -1,17 +0,0 @@
ext-xlswriter:
type: php-extension
artifact:
source:
type: pecl
name: xlswriter
metadata:
license-files: [LICENSE]
license: BSD-2-Clause
depends:
- ext-zlib
- ext-zip
suggests:
- openssl
php-extension:
arg-type: custom
arg-type@windows: '--with-xlswriter'

View File

@@ -1,16 +0,0 @@
ext-xz:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/codemasher/php-ext-xz'
rev: main
extract: php-src/ext/xz
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- xz
php-extension:
arg-type: with-path
arg-type@windows: enable

View File

@@ -1,14 +0,0 @@
ext-yac:
type: php-extension
artifact:
source:
type: pecl
name: yac
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends@unix:
- fastlz
- ext-igbinary
php-extension:
arg-type@unix: '--enable-yac@shared_suffix@ --enable-igbinary --enable-json --with-system-fastlz'

View File

@@ -1,16 +0,0 @@
ext-yaml:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/php/pecl-file_formats-yaml'
rev: php7
extract: php-src/ext/yaml
metadata:
license-files: [LICENSE]
license: MIT
depends:
- libyaml
php-extension:
arg-type@unix: with-path
arg-type@windows: with

View File

@@ -1,15 +0,0 @@
ext-zip:
type: php-extension
artifact:
source:
type: pecl
name: zip
extract: ext-zip
metadata:
license-files: [LICENSE]
license: PHP-3.01
depends:
- libzip
php-extension:
arg-type: custom
arg-type@windows: enable

View File

@@ -1,18 +0,0 @@
ext-zstd:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/kjdev/php-ext-zstd'
rev: master
extract: php-src/ext/zstd
metadata:
license-files: [LICENSE]
license: MIT
depends:
- zstd
suggests:
- ext-apcu
php-extension:
arg-type: '--enable-zstd --with-libzstd=@build_root_path@'
arg-type@windows: '--enable-zstd'

View File

@@ -1,10 +0,0 @@
attr:
type: library
artifact:
source: 'https://download.savannah.nongnu.org/releases/attr/attr-2.5.2.tar.gz'
source-mirror: 'https://mirror.souseiseki.middlendian.com/nongnu/attr/attr-2.5.2.tar.gz'
metadata:
license-files: [doc/COPYING.LGPL]
license: LGPL-2.1-or-later
static-libs@unix:
- libattr.a

View File

@@ -1,20 +0,0 @@
brotli:
type: library
artifact:
source:
type: ghtagtar
repo: google/brotli
match: 'v1\.\d.*'
metadata:
license-files: [LICENSE]
license: MIT
headers:
- brotli
pkg-configs:
- libbrotlicommon
- libbrotlidec
- libbrotlienc
static-libs@windows:
- brotlicommon.lib
- brotlidec.lib
- brotlienc.lib

View File

@@ -1,20 +0,0 @@
bzip2:
type: library
artifact:
source:
type: url
url: 'https://dl.static-php.dev/static-php-cli/deps/bzip2/bzip2-1.0.8.tar.gz'
source-mirror:
type: filelist
url: 'https://sourceware.org/pub/bzip2/'
regex: '/href="(?<file>bzip2-(?<version>[^"]+)\.tar\.gz)"/'
metadata:
license-files: ['@/bzip2.txt']
license: bzip2-1.0.6
headers:
- bzlib.h
static-libs@unix:
- libbz2.a
static-libs@windows:
- libbz2.lib
- libbz2_a.lib

View File

@@ -1,14 +0,0 @@
fastlz:
type: library
artifact:
source:
type: git
url: 'https://github.com/ariya/FastLZ.git'
rev: master
metadata:
license-files: [LICENSE.MIT]
license: MIT
headers:
- fastlz.h
static-libs@unix:
- libfastlz.a

View File

@@ -1,23 +0,0 @@
freetype:
type: library
artifact:
source:
type: ghtagtar
repo: freetype/freetype
match: VER-2-\d+-\d+
metadata:
license-files: [LICENSE.TXT]
license: FTL
depends:
- zlib
suggests:
- libpng
- bzip2
- brotli
headers@unix:
- freetype2/freetype/freetype.h
- freetype2/ft2build.h
static-libs@unix:
- libfreetype.a
static-libs@windows:
- libfreetype_a.lib

View File

@@ -1,9 +0,0 @@
gettext-win:
type: library
artifact:
source:
type: git
url: 'https://github.com/winlibs/gettext.git'
rev: '0.18'
static-libs@windows:
- libintl_a.lib

View File

@@ -1,23 +0,0 @@
gettext:
type: library
artifact:
source:
type: filelist
url: 'https://ftp.gnu.org/gnu/gettext/'
regex: '/href="(?<file>gettext-(?<version>[^"]+)\.tar\.xz)"/'
source-mirror:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/gettext/'
regex: '/href="(?<file>gettext-(?<version>[^"]+)\.tar\.xz)"/'
metadata:
license-files: [gettext-runtime/intl/COPYING.LIB]
license: LGPL-2.1-or-later
depends:
- libiconv
suggests:
- ncurses
- libxml2
frameworks:
- CoreFoundation
static-libs@unix:
- libintl.a

View File

@@ -1,17 +0,0 @@
glfw:
type: library
artifact: glfw
frameworks:
- Cocoa
- CoreFoundation
- CoreVideo
- IOKit
- QuartzCore
headers:
- GLFW/glfw3.h
- GLFW/glfw3native.h
lang: cpp
static-libs@unix:
- libglfw3.a
static-libs@windows:
- glfw3.lib

View File

@@ -1,20 +0,0 @@
gmp:
type: library
artifact:
source:
type: filelist
url: 'https://ftp.gnu.org/gnu/gmp/'
regex: '/href="(?<file>gmp-(?<version>[^"]+)\.tar\.xz)"/'
source-mirror:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/gmp/'
regex: '/href="(?<file>gmp-(?<version>[^"]+)\.tar\.xz)"/'
metadata:
license-files: ['@/gmp.txt']
license: Custom
headers:
- gmp.h
pkg-configs:
- gmp
static-libs@unix:
- libgmp.a

View File

@@ -1,15 +0,0 @@
gmssl:
type: library
artifact:
source:
type: ghtar
repo: guanzhi/GmSSL
metadata:
license-files: [LICENSE]
license: Apache-2.0
frameworks:
- Security
static-libs@unix:
- libgmssl.a
static-libs@windows:
- gmssl.lib

View File

@@ -1,19 +0,0 @@
grpc:
type: library
artifact:
source:
type: git
rev: v1.75.x
url: 'https://github.com/grpc/grpc.git'
metadata:
license-files: [LICENSE]
license: Apache-2.0
depends:
- zlib
- openssl
- libcares
frameworks:
- CoreFoundation
lang: cpp
pkg-configs:
- grpc

View File

@@ -1,25 +0,0 @@
icu:
type: library
artifact:
source:
type: ghrel
repo: unicode-org/icu
match: icu4c.+-src\.tgz
prefer-stable: true
binary:
windows-x86_64: { type: url, url: 'https://dl.static-php.dev/static-php-cli/deps/icu-static-windows-x64/icu-static-windows-x64.zip', extract: hosted }
metadata:
license-files: ['@/icu.txt']
license: ICU
headers@windows:
- unicode
lang: cpp
pkg-configs:
- icu-uc
- icu-i18n
- icu-io
static-libs@windows:
- icudt.lib
- icuin.lib
- icuio.lib
- icuuc.lib

View File

@@ -1,25 +0,0 @@
idn2:
type: library
artifact:
source:
type: filelist
url: 'https://ftp.gnu.org/gnu/libidn/'
regex: '/href="(?<file>libidn2-(?<version>[^"]+)\.tar\.gz)"/'
source-mirror:
type: filelist
url: 'https://ftpmirror.gnu.org/gnu/libidn/'
regex: '/href="(?<file>libidn2-(?<version>[^"]+)\.tar\.gz)"/'
metadata:
license-files: [COPYING.LESSERv3]
license: LGPL-3.0-or-later
depends@macos:
- libiconv
- gettext
suggests@unix:
- libiconv
- gettext
- libunistring
headers:
- idn2.h
pkg-configs:
- libidn2

View File

@@ -1,28 +0,0 @@
imagemagick:
type: library
artifact:
source:
type: ghtar
repo: ImageMagick/ImageMagick
metadata:
license-files: [LICENSE]
depends:
- zlib
- libjpeg
- libjxl
- libpng
- libwebp
- freetype
- libtiff
- libheif
- bzip2
suggests:
- zstd
- xz
- libzip
- libxml2
lang: cpp
pkg-configs:
- Magick++-7.Q16HDRI
- MagickCore-7.Q16HDRI
- MagickWand-7.Q16HDRI

View File

@@ -1,13 +0,0 @@
imap:
type: library
artifact:
source:
type: git
url: 'https://github.com/static-php/imap.git'
rev: master
metadata:
license-files: [LICENSE]
suggests@unix:
- openssl
static-libs@unix:
- libc-client.a

Some files were not shown because too many files have changed in this diff Show More