Skip to content

Commit ec9364d

Browse files
authored
use latest zip version for building shared (#917)
2 parents 61cba23 + 033e299 commit ec9364d

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

config/ext.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,9 @@
11521152
"support": {
11531153
"BSD": "wip"
11541154
},
1155-
"type": "builtin",
1156-
"arg-type": "with-path",
1155+
"type": "external",
1156+
"source": "ext-zip",
1157+
"arg-type": "custom",
11571158
"arg-type-windows": "enable",
11581159
"lib-depends-unix": [
11591160
"libzip"

config/source.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@
263263
"path": "LICENSE"
264264
}
265265
},
266+
"ext-zip": {
267+
"type": "url",
268+
"url": "https://pecl.php.net/get/zip",
269+
"filename": "ext-zip.tgz",
270+
"license": {
271+
"type": "file",
272+
"path": "LICENSE"
273+
}
274+
},
266275
"ext-zstd": {
267276
"type": "git",
268277
"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)