Skip to content

Commit a49ae05

Browse files
committed
use latest zip version for building shared
1 parent 384ba54 commit a49ae05

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

config/ext.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,9 @@
11541154
"support": {
11551155
"BSD": "wip"
11561156
},
1157-
"type": "builtin",
1158-
"arg-type": "with-path",
1157+
"type": "external",
1158+
"source": "ext-zip",
1159+
"arg-type": "custom",
11591160
"arg-type-windows": "enable",
11601161
"lib-depends-unix": [
11611162
"libzip"

config/source.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,16 @@
263263
"path": "LICENSE"
264264
}
265265
},
266+
"ext-zip": {
267+
"type": "url",
268+
"url": "https://pecl.php.net/get/zip",
269+
"path": "php-src/ext/zip/latest",
270+
"filename": "ext-zip.tgz",
271+
"license": {
272+
"type": "file",
273+
"path": "LICENSE"
274+
}
275+
},
266276
"ext-zstd": {
267277
"type": "git",
268278
"path": "php-src/ext/zstd",

src/SPC/builder/extension/zip.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SPC\builder\extension;
6+
7+
use SPC\builder\Extension;
8+
use SPC\util\CustomExt;
9+
10+
#[CustomExt('zip')]
11+
class zip extends Extension
12+
{
13+
public function getUnixConfigureArg(bool $shared = false): string
14+
{
15+
return !$shared ? '--with-zip=' . BUILD_ROOT_PATH : '--enable-zip=shared';
16+
}
17+
}

0 commit comments

Comments
 (0)