mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Fix libtiff dependencies, avoid using system libraries (#588)
* Remove tmate debugger * Bump version to 2.4.4 * Fix libtiff dependencies may wrongly added * Add matrix tests * Add tmate debug * Disable libdeflate for libtiff * Remove ssh debugger
This commit is contained in:
parent
4bd3a2ae25
commit
36b4ef306e
6
.github/workflows/build-unix.yml
vendored
6
.github/workflows/build-unix.yml
vendored
@ -147,9 +147,9 @@ jobs:
|
|||||||
run: ${{ needs.define-build.outputs.download }}
|
run: ${{ needs.define-build.outputs.download }}
|
||||||
- name: "Build PHP"
|
- name: "Build PHP"
|
||||||
run: ${{ needs.define-build.outputs.build }}
|
run: ${{ needs.define-build.outputs.build }}
|
||||||
- name: Setup tmate session
|
#- name: Setup tmate session
|
||||||
if: ${{ failure() }}
|
# if: ${{ failure() }}
|
||||||
uses: mxschmitt/action-tmate@v3
|
# uses: mxschmitt/action-tmate@v3
|
||||||
|
|
||||||
# Upload cli executable
|
# Upload cli executable
|
||||||
- if: ${{ inputs.build-cli == true }}
|
- if: ${{ inputs.build-cli == true }}
|
||||||
|
|||||||
@ -425,6 +425,10 @@
|
|||||||
"source": "libtiff",
|
"source": "libtiff",
|
||||||
"static-libs-unix": [
|
"static-libs-unix": [
|
||||||
"libtiff.a"
|
"libtiff.a"
|
||||||
|
],
|
||||||
|
"lib-depends": [
|
||||||
|
"zlib",
|
||||||
|
"libjpeg"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"libuuid": {
|
"libuuid": {
|
||||||
|
|||||||
@ -31,7 +31,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const VERSION = '2.4.3';
|
public const VERSION = '2.4.4';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,10 +15,18 @@ trait libtiff
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
|
// zlib
|
||||||
|
$extra_libs = '--enable-zlib --with-zlib-include-dir=' . BUILD_ROOT_PATH . '/include --with-zlib-lib-dir=' . BUILD_ROOT_PATH . '/lib';
|
||||||
|
// libjpeg
|
||||||
|
$extra_libs .= ' --enable-jpeg --disable-old-jpeg --disable-jpeg12 --with-jpeg-include-dir=' . BUILD_ROOT_PATH . '/include --with-jpeg-lib-dir=' . BUILD_ROOT_PATH . '/lib';
|
||||||
|
// We disabled lzma, zstd, webp, libdeflate by default to reduce the size of the binary
|
||||||
|
$extra_libs .= ' --disable-lzma --disable-zstd --disable-webp --disable-libdeflate';
|
||||||
|
|
||||||
$shell = shell()->cd($this->source_dir)
|
$shell = shell()->cd($this->source_dir)
|
||||||
->exec(
|
->exec(
|
||||||
'./configure ' .
|
'./configure ' .
|
||||||
'--enable-static --disable-shared ' .
|
'--enable-static --disable-shared ' .
|
||||||
|
"{$extra_libs} " .
|
||||||
'--disable-cxx ' .
|
'--disable-cxx ' .
|
||||||
'--prefix='
|
'--prefix='
|
||||||
);
|
);
|
||||||
|
|||||||
@ -13,8 +13,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
// test php version
|
// test php version
|
||||||
$test_php_version = [
|
$test_php_version = [
|
||||||
'8.1',
|
|
||||||
'8.2',
|
|
||||||
'8.3',
|
'8.3',
|
||||||
'8.4',
|
'8.4',
|
||||||
];
|
];
|
||||||
@ -22,9 +20,8 @@ $test_php_version = [
|
|||||||
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
|
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
'macos-14',
|
'macos-14',
|
||||||
// 'macos-13',
|
'macos-13',
|
||||||
'ubuntu-latest',
|
'ubuntu-latest',
|
||||||
'windows-latest',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
@ -40,7 +37,7 @@ $prefer_pre_built = false;
|
|||||||
|
|
||||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||||
$extensions = match (PHP_OS_FAMILY) {
|
$extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'ast',
|
'Linux', 'Darwin' => 'imagick',
|
||||||
'Windows' => 'ast',
|
'Windows' => 'ast',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user