mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
requested changes
This commit is contained in:
parent
2c644d5c18
commit
f246125677
@ -1,14 +0,0 @@
|
|||||||
; Modify this file name to `env.custom.ini`, and run `bin/spc-gnu-docker`,
|
|
||||||
; you can compile a GNU libc based static binary !
|
|
||||||
[global]
|
|
||||||
SPC_SKIP_DOCTOR_CHECK_ITEMS="if musl-wrapper is installed,if musl-cross-make is installed"
|
|
||||||
|
|
||||||
[linux]
|
|
||||||
CC=gcc
|
|
||||||
CXX=g++
|
|
||||||
AR=ar
|
|
||||||
LD=ld
|
|
||||||
SPC_DEFAULT_C_FLAGS=-fPIC
|
|
||||||
SPC_NO_MUSL_PATH=yes
|
|
||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-Wl,-O1 -pie"
|
|
||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm -lresolv -lutil"
|
|
||||||
@ -129,6 +129,8 @@ SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}"
|
|||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="${SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS}"
|
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="${SPC_PHP_DEFAULT_OPTIMIZE_CFLAGS}"
|
||||||
; EXTRA_LIBS for `make` php
|
; EXTRA_LIBS for `make` php
|
||||||
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-lresolv"
|
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-lresolv"
|
||||||
|
; embed type for php, static (libphp.a) or shared (libphp.dylib)
|
||||||
|
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
|
||||||
|
|
||||||
[freebsd]
|
[freebsd]
|
||||||
; compiler environments
|
; compiler environments
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"rev": "v2.5.2",
|
"rev": "v2.5.2",
|
||||||
"url": "https://git.savannah.nongnu.org/git/attr.git",
|
"url": "https://git.savannah.nongnu.org/git/attr.git",
|
||||||
"provide-pre-built": false,
|
"provide-pre-built": true,
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "doc/COPYING"
|
"path": "doc/COPYING"
|
||||||
@ -337,7 +337,7 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"rev": "v2.3.2",
|
"rev": "v2.3.2",
|
||||||
"url": "https://git.savannah.nongnu.org/git/acl.git",
|
"url": "https://git.savannah.nongnu.org/git/acl.git",
|
||||||
"provide-pre-built": false,
|
"provide-pre-built": true,
|
||||||
"license": {
|
"license": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"path": "doc/COPYING"
|
"path": "doc/COPYING"
|
||||||
|
|||||||
@ -139,7 +139,8 @@ class Extension
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch code before ./buildconf
|
* Patch code before ./buildconf
|
||||||
* If you need to patch some code, overwrite this and return true
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if not
|
||||||
*/
|
*/
|
||||||
public function patchBeforeBuildconf(): bool
|
public function patchBeforeBuildconf(): bool
|
||||||
{
|
{
|
||||||
@ -148,7 +149,8 @@ class Extension
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch code before ./configure
|
* Patch code before ./configure
|
||||||
* If you need to patch some code, overwrite this and return true
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if not
|
||||||
*/
|
*/
|
||||||
public function patchBeforeConfigure(): bool
|
public function patchBeforeConfigure(): bool
|
||||||
{
|
{
|
||||||
@ -157,7 +159,8 @@ class Extension
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Patch code before make
|
* Patch code before make
|
||||||
* If you need to patch some code, overwrite this and return true
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if not
|
||||||
*/
|
*/
|
||||||
public function patchBeforeMake(): bool
|
public function patchBeforeMake(): bool
|
||||||
{
|
{
|
||||||
|
|||||||
@ -294,11 +294,31 @@ abstract class LibraryBase
|
|||||||
// do something before pack, default do nothing. overwrite this method to do something (e.g. modify pkg-config file)
|
// do something before pack, default do nothing. overwrite this method to do something (e.g. modify pkg-config file)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch code before ./buildconf
|
||||||
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if notand return true
|
||||||
|
*/
|
||||||
|
public function patchBeforeBuildconf(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch code before ./configure
|
||||||
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if not
|
||||||
|
*/
|
||||||
public function patchBeforeConfigure(): bool
|
public function patchBeforeConfigure(): bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Patch code before make
|
||||||
|
* If you need to patch some code, overwrite this
|
||||||
|
* return true if you patched something, false if not
|
||||||
|
*/
|
||||||
public function patchBeforeMake(): bool
|
public function patchBeforeMake(): bool
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -47,6 +47,11 @@ class SourcePatcher
|
|||||||
logger()->info('Extension [' . $ext->getName() . '] patched before buildconf');
|
logger()->info('Extension [' . $ext->getName() . '] patched before buildconf');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
foreach ($builder->getLibs() as $lib) {
|
||||||
|
if ($lib->patchBeforeBuildconf() === true) {
|
||||||
|
logger()->info('Library [' . $lib->getName() . '] patched before buildconf');
|
||||||
|
}
|
||||||
|
}
|
||||||
// patch windows php 8.1 bug
|
// patch windows php 8.1 bug
|
||||||
if (PHP_OS_FAMILY === 'Windows' && $builder->getPHPVersionID() >= 80100 && $builder->getPHPVersionID() < 80200) {
|
if (PHP_OS_FAMILY === 'Windows' && $builder->getPHPVersionID() >= 80100 && $builder->getPHPVersionID() < 80200) {
|
||||||
logger()->info('Patching PHP 8.1 windows Fiber bug');
|
logger()->info('Patching PHP 8.1 windows Fiber bug');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user