Skip to content

Commit 0c8bb87

Browse files
committed
merge code
2 parents 7ae4dce + c76cf4f commit 0c8bb87

13 files changed

Lines changed: 290 additions & 136 deletions

File tree

.github/workflows/linux-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
mkdir -p bin/
108108
mkdir -p runtime/
109109
test -f runtime/php && rm -f runtime/php
110-
if [ ! -f runtime/php/php ] ; then
110+
if [ ! -f runtime/php/pie ] ; then
111111
bash setup-php-runtime.sh
112112
fi
113113
bash sapi/download-box/download-box-get-archive-from-server.sh

.github/workflows/linux-glibc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
mkdir -p bin/
8686
mkdir -p runtime/
8787
test -f runtime/php && rm -f runtime/php
88-
if [ ! -f runtime/php/php ] ; then
88+
if [ ! -f runtime/php/pie ] ; then
8989
bash setup-php-runtime.sh
9090
fi
9191
bash sapi/download-box/download-box-get-archive-from-server.sh
@@ -99,7 +99,7 @@ jobs:
9999
composer install --no-interaction --no-autoloader --no-scripts --profile
100100
composer dump-autoload --optimize --profile
101101
102-
php prepare.php --with-libavif
102+
php prepare.php --with-libavif --without-docker
103103
104104
sudo apt update
105105
bash ./sapi/scripts/install-deps-on-ubuntu.sh

.github/workflows/linux-x86_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
mkdir -p bin/
155155
mkdir -p runtime/
156156
test -f runtime/php && rm -f runtime/php
157-
if [ ! -f runtime/php/php ] ; then
157+
if [ ! -f runtime/php/pie ] ; then
158158
bash setup-php-runtime.sh
159159
fi
160160

.github/workflows/macos-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
mkdir -p bin/
104104
mkdir -p runtime/
105105
test -f runtime/php && rm -f runtime/php
106-
if [ ! -f runtime/php/php ] ; then
106+
if [ ! -f runtime/php/pie ] ; then
107107
bash setup-php-runtime.sh
108108
fi
109109
bash sapi/download-box/download-box-get-archive-from-server.sh

.github/workflows/macos-x86_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
mkdir -p bin/
117117
mkdir -p runtime/
118118
test -f runtime/php && rm -f runtime/php
119-
if [ ! -f runtime/php/php ] ; then
119+
if [ ! -f runtime/php/pie ] ; then
120120
bash setup-php-runtime.sh
121121
fi
122122
bash sapi/download-box/download-box-get-archive-from-server.sh

.github/workflows/windows-msys2.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
- name: prepare build environment
6464
shell: msys2 {0}
6565
run: |
66-
bash ./sapi/quickstart/windows/msys2-build/install-msys2.sh
66+
bash sapi/quickstart/windows/msys2-build/install-msys2.sh
67+
bash sapi/download-box/download-box-get-archive-from-server.sh
6768
6869
- name: install deps lib with source code
6970
shell: msys2 {0}

prepare.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,15 @@
9090
// Sync code from php-src
9191
$p->setPhpSrcDir($p->getWorkDir() . '/var/php-' . BUILD_PHP_VERSION);
9292

93+
/*
94+
// Download swoole-src
95+
if (!is_dir(__DIR__ . '/ext/swoole')) {
96+
//shell_exec(__DIR__ . '/sapi/scripts/download-swoole-src-archive.sh');
97+
}
98+
*/
9399

94100
// Compile directly on the host machine, not in the docker container
95-
if ($p->getInputOption('without-docker') || ($p->isMacos())) {
101+
if ($p->getInputOption('without-docker') || ($p->isMacos()) || ($p->isLinux() && (!is_file('/.dockerenv')))) {
96102
$p->setWorkDir(__DIR__);
97103
$p->setBuildDir(__DIR__ . '/thirdparty');
98104
}
@@ -160,9 +166,13 @@
160166

161167
if ($p->isMacos()) {
162168
//$p->setExtraLdflags('-undefined dynamic_lookup');
163-
//$p->setExtraLdflags(' -framework CoreFoundation');
164-
$p->setExtraLdflags(' ');
165-
$homebrew_prefix = trim(shell_exec('brew --prefix'));
169+
$p->setExtraLdflags('');
170+
exec("brew --prefix 2>&1", $output, $result_code);
171+
if ($result_code == 0) {
172+
$homebrew_prefix = trim(implode(' ', $output));
173+
} else {
174+
$homebrew_prefix = "";
175+
}
166176
$p->withBinPath($homebrew_prefix . '/opt/flex/bin')
167177
->withBinPath($homebrew_prefix . '/opt/bison/bin')
168178
->withBinPath($homebrew_prefix . '/opt/libtool/bin')

sapi/src/Extension.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ class Extension extends Project
77
public string $options = '';
88
public string $peclVersion = '';
99

10+
public string $pieVersion = '';
11+
public string $pieName = '';
12+
1013
public array $dependentExtensions = [];
1114

1215
public function withOptions(string $options): static
@@ -26,4 +29,17 @@ public function withDependentExtensions(string ...$extensions): static
2629
$this->dependentExtensions += $extensions;
2730
return $this;
2831
}
32+
33+
public function withPieVersion(string $pieVersion): static
34+
{
35+
$this->pieVersion = $pieVersion;
36+
return $this;
37+
}
38+
39+
public function withPieName(string $pieName): static
40+
{
41+
$this->pieName = $pieName;
42+
return $this;
43+
}
44+
2945
}

0 commit comments

Comments
 (0)