Skip to content

Commit 1c28f0f

Browse files
authored
bunch of fixes/changes to make packages build (#1006)
2 parents ae0217b + b3c4502 commit 1c28f0f

32 files changed

+502
-391
lines changed

bin/spc-alpine-docker

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ RUN apk update; \
108108
wget \
109109
xz \
110110
gettext-dev \
111-
binutils-gold \
112-
patchelf
111+
binutils-gold
113112
114113
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 && \
115114
chmod +x /usr/local/bin/php

bin/spc-gnu-docker

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ RUN echo "source scl_source enable devtoolset-10" >> /etc/bashrc
9292
RUN source /etc/bashrc
9393
RUN yum install -y which
9494
95-
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 && \
96-
mkdir -p /patchelf && \
97-
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
98-
cp /patchelf/bin/patchelf /usr/bin/
99-
10095
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 && \
10196
mkdir /cmake && \
10297
tar -xzf cmake.tgz -C /cmake --strip-components 1

composer.lock

Lines changed: 221 additions & 207 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/env.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE
115115
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
116116
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
117117

118+
; optional, path to openssl conf. This affects where openssl will look for the default CA.
119+
; default on Debian/Alpine: /etc/ssl, default on RHEL: /etc/pki/tls
120+
OPENSSLDIR=""
121+
118122
[macos]
119123
; build target: macho or macho (possibly we could support macho-universal in the future)
120124
; Currently we do not support universal and cross-compilation for macOS.

config/ext.json

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,13 @@
240240
"BSD": "wip"
241241
},
242242
"type": "external",
243-
"source": "grpc",
243+
"source": "ext-grpc",
244244
"arg-type-unix": "enable-path",
245245
"cpp-extension": true,
246246
"lib-depends": [
247-
"grpc"
247+
"zlib",
248+
"openssl",
249+
"libcares"
248250
]
249251
},
250252
"iconv": {
@@ -416,8 +418,7 @@
416418
"ext-depends": [
417419
"zlib",
418420
"session"
419-
],
420-
"build-with-php": true
421+
]
421422
},
422423
"memcached": {
423424
"support": {
@@ -495,6 +496,40 @@
495496
"zlib"
496497
]
497498
},
499+
"mysqlnd_ed25519": {
500+
"type": "external",
501+
"source": "mysqlnd_ed25519",
502+
"arg-type": "enable",
503+
"target": [
504+
"shared"
505+
],
506+
"ext-depends": [
507+
"mysqlnd"
508+
],
509+
"lib-depends": [
510+
"libsodium"
511+
],
512+
"lib-suggests": [
513+
"openssl"
514+
]
515+
},
516+
"mysqlnd_parsec": {
517+
"type": "external",
518+
"source": "mysqlnd_parsec",
519+
"arg-type": "enable",
520+
"target": [
521+
"shared"
522+
],
523+
"ext-depends": [
524+
"mysqlnd"
525+
],
526+
"lib-depends": [
527+
"libsodium"
528+
],
529+
"lib-suggests": [
530+
"openssl"
531+
]
532+
},
498533
"oci8": {
499534
"type": "wip",
500535
"support": {

config/lib.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@
361361
"source": "libargon2",
362362
"static-libs-unix": [
363363
"libargon2.a"
364+
],
365+
"lib-suggests": [
366+
"libsodium"
364367
]
365368
},
366369
"libavif": {

config/source.json

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@
161161
"path": "LICENSE"
162162
}
163163
},
164+
"ext-grpc": {
165+
"type": "url",
166+
"url": "https://pecl.php.net/get/grpc",
167+
"path": "php-src/ext/grpc",
168+
"filename": "grpc.tgz",
169+
"license": {
170+
"type": "file",
171+
"path": [
172+
"LICENSE"
173+
]
174+
}
175+
},
164176
"ext-imagick": {
165177
"type": "url",
166178
"url": "https://pecl.php.net/get/imagick",
@@ -680,19 +692,20 @@
680692
}
681693
},
682694
"libpng": {
683-
"type": "git",
684-
"url": "https://github.com/glennrp/libpng.git",
685-
"rev": "libpng16",
695+
"type": "ghtagtar",
696+
"repo": "pnggroup/libpng",
697+
"match": "v1\\.6\\.\\d+",
698+
"query": "?per_page=150",
686699
"provide-pre-built": true,
687700
"license": {
688701
"type": "file",
689702
"path": "LICENSE"
690703
}
691704
},
692705
"librabbitmq": {
693-
"type": "git",
694-
"url": "https://github.com/alanxz/rabbitmq-c.git",
695-
"rev": "master",
706+
"type": "ghtar",
707+
"repo": "alanxz/rabbitmq-c",
708+
"prefer-stable": true,
696709
"license": {
697710
"type": "file",
698711
"path": "LICENSE"
@@ -709,7 +722,7 @@
709722
"libsodium": {
710723
"type": "ghrel",
711724
"repo": "jedisct1/libsodium",
712-
"match": "libsodium-\\d+(\\.\\d+)*\\.tar\\.gz",
725+
"match": "libsodium-(?!1\\.0\\.21)\\d+(\\.\\d+)*\\.tar\\.gz",
713726
"prefer-stable": true,
714727
"provide-pre-built": true,
715728
"license": {
@@ -881,6 +894,24 @@
881894
"path": "LICENSE"
882895
}
883896
},
897+
"mysqlnd_ed25519": {
898+
"type": "pie",
899+
"repo": "mariadb/mysqlnd_ed25519",
900+
"path": "php-src/ext/mysqlnd_ed25519",
901+
"license": {
902+
"type": "file",
903+
"path": "LICENSE"
904+
}
905+
},
906+
"mysqlnd_parsec": {
907+
"type": "pie",
908+
"repo": "mariadb/mysqlnd_parsec",
909+
"path": "php-src/ext/mysqlnd_parsec",
910+
"license": {
911+
"type": "file",
912+
"path": "LICENSE"
913+
}
914+
},
884915
"ncurses": {
885916
"type": "filelist",
886917
"url": "https://ftp.gnu.org/pub/gnu/ncurses/",

docs/en/guide/manual-build.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -549,22 +549,24 @@ otherwise it will be executed repeatedly in other events.
549549

550550
The following are the supported `patch_point` event names and corresponding locations:
551551

552-
| Event name | Event description |
553-
|------------------------------|----------------------------------------------------------------------------------------------------|
554-
| before-libs-extract | Triggered before the dependent libraries extracted |
555-
| after-libs-extract | Triggered after the compiled dependent libraries extracted |
556-
| before-php-extract | Triggered before PHP source code extracted |
557-
| after-php-extract | Triggered after PHP source code extracted |
558-
| before-micro-extract | Triggered before phpmicro extract |
559-
| after-micro-extract | Triggered after phpmicro extracted |
560-
| before-exts-extract | Triggered before the extension (to be compiled) extracted to the PHP source directory |
561-
| after-exts-extract | Triggered after the extension extracted to the PHP source directory |
562-
| before-library[*name*]-build | Triggered before the library named `name` is compiled (such as `before-library[postgresql]-build`) |
563-
| after-library[*name*]-build | Triggered after the library named `name` is compiled |
564-
| before-php-buildconf | Triggered before compiling PHP command `./buildconf` |
565-
| before-php-configure | Triggered before compiling PHP command `./configure` |
566-
| before-php-make | Triggered before compiling PHP command `make` |
567-
| before-sanity-check | Triggered after compiling PHP but before running extended checks |
552+
| Event name | Event description |
553+
|---------------------------------|----------------------------------------------------------------------------------------------------|
554+
| before-libs-extract | Triggered before the dependent libraries extracted |
555+
| after-libs-extract | Triggered after the compiled dependent libraries extracted |
556+
| before-php-extract | Triggered before PHP source code extracted |
557+
| after-php-extract | Triggered after PHP source code extracted |
558+
| before-micro-extract | Triggered before phpmicro extract |
559+
| after-micro-extract | Triggered after phpmicro extracted |
560+
| before-exts-extract | Triggered before the extension (to be compiled) extracted to the PHP source directory |
561+
| after-exts-extract | Triggered after the extension extracted to the PHP source directory |
562+
| before-library[*name*]-build | Triggered before the library named `name` is compiled (such as `before-library[postgresql]-build`) |
563+
| after-library[*name*]-build | Triggered after the library named `name` is compiled |
564+
| after-shared-ext[*name*]-build | Triggered after the shared extension named `name` is compiled |
565+
| before-shared-ext[*name*]-build | Triggered before the shared extension named `name` is compiled |
566+
| before-php-buildconf | Triggered before compiling PHP command `./buildconf` |
567+
| before-php-configure | Triggered before compiling PHP command `./configure` |
568+
| before-php-make | Triggered before compiling PHP command `make` |
569+
| before-sanity-check | Triggered after compiling PHP but before running extended checks |
568570

569571
The following is a simple example of temporarily modifying the PHP source code.
570572
Enable the CLI function to search for the `php.ini` configuration in the current working directory:

docs/zh/guide/manual-build.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ bin/spc dev:sort-config ext
500500
| after-exts-extract | 在要编译的扩展解压到 PHP 源码目录后触发 |
501501
| before-library[*name*]-build | 在名称为 `name` 的库编译前触发(如 `before-library[postgresql]-build`|
502502
| after-library[*name*]-build | 在名称为 `name` 的库编译后触发 |
503+
| after-shared-ext[*name*]-build | 在名称为 `name` 的共享扩展编译后触发(如 `after-shared-ext[redis]-build`|
504+
| before-shared-ext[*name*]-build | 在名称为 `name` 的共享扩展编译前触发 |
503505
| before-php-buildconf | 在编译 PHP 命令 `./buildconf` 前触发 |
504506
| before-php-configure | 在编译 PHP 命令 `./configure` 前触发 |
505507
| before-php-make | 在编译 PHP 命令 `make` 前触发 |

src/SPC/ConsoleApplication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
final class ConsoleApplication extends Application
3636
{
37-
public const string VERSION = '2.7.11';
37+
public const string VERSION = '2.8.0';
3838

3939
public function __construct()
4040
{

0 commit comments

Comments
 (0)