Skip to content

Commit 75f2efc

Browse files
committed
Change the patch position for -release module suffix
1 parent a0f9985 commit 75f2efc

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

src/SPC/builder/LibraryBase.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -215,19 +215,6 @@ public function tryInstall(array $lock, bool $force_install = false): int
215215
*/
216216
public function tryBuild(bool $force_build = false): int
217217
{
218-
if (str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), '-release')) {
219-
FileSystem::replaceFileLineContainsString(
220-
SOURCE_PATH . '/php-src/ext/standard/info.c',
221-
'#ifdef CONFIGURE_COMMAND',
222-
'#ifdef NO_CONFIGURE_COMMAND',
223-
);
224-
} else {
225-
FileSystem::replaceFileLineContainsString(
226-
SOURCE_PATH . '/php-src/ext/standard/info.c',
227-
'#ifdef NO_CONFIGURE_COMMAND',
228-
'#ifdef CONFIGURE_COMMAND',
229-
);
230-
}
231218
if (file_exists($this->source_dir . '/.spc.patched')) {
232219
$this->patched = true;
233220
}

src/SPC/store/SourcePatcher.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,20 @@ public static function patchBeforeMake(BuilderBase $builder): void
287287
logger()->info('Library [' . $lib->getName() . '] patched before make');
288288
}
289289
}
290+
291+
if (str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), '-release')) {
292+
FileSystem::replaceFileLineContainsString(
293+
SOURCE_PATH . '/php-src/ext/standard/info.c',
294+
'#ifdef CONFIGURE_COMMAND',
295+
'#ifdef NO_CONFIGURE_COMMAND',
296+
);
297+
} else {
298+
FileSystem::replaceFileLineContainsString(
299+
SOURCE_PATH . '/php-src/ext/standard/info.c',
300+
'#ifdef NO_CONFIGURE_COMMAND',
301+
'#ifdef CONFIGURE_COMMAND',
302+
);
303+
}
290304
}
291305

292306
/**

0 commit comments

Comments
 (0)