Skip to content

Commit 53c1cec

Browse files
authored
解决maocos 环境下 oniguruma 构建错误 (#1081)
1 parent 758b48d commit 53c1cec

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

sapi/src/builder/library/oniguruma.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,23 @@
88
$p->addLibrary(
99
(new Library('oniguruma'))
1010
->withHomePage('https://github.com/kkos/oniguruma.git')
11+
->withLicense('https://github.com/kkos/oniguruma/blob/master/COPYING', Library::LICENSE_SPEC)
1112
->withUrl('https://github.com/kkos/oniguruma/archive/refs/tags/v6.9.9.tar.gz')
1213
->withFile('oniguruma-v6.9.9.tar.gz')
1314
->withFileHash('md5', '6a3defb3d5e57c2fa4b6f3b4ec6de28b')
1415
->withPrefix($oniguruma_prefix)
1516
->withConfigure(
16-
'./autogen.sh && ./configure --prefix=' . $oniguruma_prefix . ' --enable-static --disable-shared'
17+
<<<EOF
18+
./autogen.sh
19+
./configure --help
20+
CFLAGS="-std=gnu17" \
21+
./configure \
22+
--prefix={$oniguruma_prefix} \
23+
--enable-shared=no \
24+
--enable-static=yes
25+
26+
EOF
1727
)
18-
->withLicense('https://github.com/kkos/oniguruma/blob/master/COPYING', Library::LICENSE_SPEC)
1928
->withPkgName('oniguruma')
2029
->withBinPath($oniguruma_prefix . '/bin/')
2130
);

0 commit comments

Comments
 (0)