Skip to content

Commit 1b4eb03

Browse files
committed
Change the patch position for -release module suffix
1 parent 6c47065 commit 1b4eb03

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
@@ -278,6 +278,20 @@ public static function patchBeforeMake(BuilderBase $builder): void
278278
logger()->info("Library [{$lib->getName()}] patched before make");
279279
}
280280
}
281+
282+
if (str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), '-release')) {
283+
FileSystem::replaceFileLineContainsString(
284+
SOURCE_PATH . '/php-src/ext/standard/info.c',
285+
'#ifdef CONFIGURE_COMMAND',
286+
'#ifdef NO_CONFIGURE_COMMAND',
287+
);
288+
} else {
289+
FileSystem::replaceFileLineContainsString(
290+
SOURCE_PATH . '/php-src/ext/standard/info.c',
291+
'#ifdef NO_CONFIGURE_COMMAND',
292+
'#ifdef CONFIGURE_COMMAND',
293+
);
294+
}
281295
}
282296

283297
/**

0 commit comments

Comments
 (0)