Skip to content

Commit 56bac35

Browse files
committed
do both in one go
1 parent 4cdc6a0 commit 56bac35

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/SPC/builder/extension/gettext.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ class gettext extends Extension
1515
public function patchBeforeBuildconf(): bool
1616
{
1717
if ($this->builder instanceof MacOSBuilder) {
18-
// new php versions
19-
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/gettext/config.m4', 'AC_CHECK_LIB([$GETTEXT_CHECK_IN_LIB', 'AC_CHECK_LIB([intl');
20-
// old php versions
21-
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/gettext/config.m4', 'AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB', 'AC_CHECK_LIB(intl');
18+
FileSystem::replaceFileStr(
19+
SOURCE_PATH . '/php-src/ext/gettext/config.m4',
20+
['AC_CHECK_LIB($GETTEXT_CHECK_IN_LIB', 'AC_CHECK_LIB([$GETTEXT_CHECK_IN_LIB'],
21+
['AC_CHECK_LIB(intl', 'AC_CHECK_LIB([intl'] // new php versions use a bracket
22+
);
2223
}
2324
return true;
2425
}

0 commit comments

Comments
 (0)