Skip to content

Commit 36b4ef3

Browse files
authored
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
1 parent 4bd3a2a commit 36b4ef3

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.github/workflows/build-unix.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ jobs:
147147
run: ${{ needs.define-build.outputs.download }}
148148
- name: "Build PHP"
149149
run: ${{ needs.define-build.outputs.build }}
150-
- name: Setup tmate session
151-
if: ${{ failure() }}
152-
uses: mxschmitt/action-tmate@v3
150+
#- name: Setup tmate session
151+
# if: ${{ failure() }}
152+
# uses: mxschmitt/action-tmate@v3
153153

154154
# Upload cli executable
155155
- if: ${{ inputs.build-cli == true }}

config/lib.json

+4
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@
425425
"source": "libtiff",
426426
"static-libs-unix": [
427427
"libtiff.a"
428+
],
429+
"lib-depends": [
430+
"zlib",
431+
"libjpeg"
428432
]
429433
},
430434
"libuuid": {

src/SPC/ConsoleApplication.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
final class ConsoleApplication extends Application
3333
{
34-
public const VERSION = '2.4.3';
34+
public const VERSION = '2.4.4';
3535

3636
public function __construct()
3737
{

src/SPC/builder/unix/library/libtiff.php

+8
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,18 @@ trait libtiff
1515
*/
1616
protected function build(): void
1717
{
18+
// zlib
19+
$extra_libs = '--enable-zlib --with-zlib-include-dir=' . BUILD_ROOT_PATH . '/include --with-zlib-lib-dir=' . BUILD_ROOT_PATH . '/lib';
20+
// libjpeg
21+
$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';
22+
// We disabled lzma, zstd, webp, libdeflate by default to reduce the size of the binary
23+
$extra_libs .= ' --disable-lzma --disable-zstd --disable-webp --disable-libdeflate';
24+
1825
$shell = shell()->cd($this->source_dir)
1926
->exec(
2027
'./configure ' .
2128
'--enable-static --disable-shared ' .
29+
"{$extra_libs} " .
2230
'--disable-cxx ' .
2331
'--prefix='
2432
);

src/globals/test-extensions.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@
1313

1414
// test php version
1515
$test_php_version = [
16-
'8.1',
17-
'8.2',
1816
'8.3',
1917
'8.4',
2018
];
2119

2220
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
2321
$test_os = [
2422
'macos-14',
25-
// 'macos-13',
23+
'macos-13',
2624
'ubuntu-latest',
27-
'windows-latest',
2825
];
2926

3027
// whether enable thread safe
@@ -40,7 +37,7 @@
4037

4138
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
4239
$extensions = match (PHP_OS_FAMILY) {
43-
'Linux', 'Darwin' => 'ast',
40+
'Linux', 'Darwin' => 'imagick',
4441
'Windows' => 'ast',
4542
};
4643

0 commit comments

Comments
 (0)