MSYS2-packages/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch
Johannes Schindelin f1413819a4 msys2-runtime: backport recent console patches
These hacks were proposed in Cygwin as a more complete set of
workarounds superseding Git for Windows'
https://github.com/git-for-windows/msys2-runtime/commit/1d0701d

This commit corresponds to
https://github.com/msys2/msys2-runtime/pull/86

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-02-15 09:58:40 +01:00

30 lines
994 B
Diff

From ca24be6425a87061467ace932ca3aa498f0fbc87 Mon Sep 17 00:00:00 2001
From: Kaleb Barrett <dev.ktbarrett@gmail.com>
Date: Sun, 14 Mar 2021 18:58:55 -0500
Subject: [PATCH 02/N] Fix msys library name in import libraries
Cygwin's speclib doesn't handle dashes or dots. However, we are about to
rename the output file name from `cygwin1.dll` to `msys-2.0.dll`.
Let's preemptively fix up all the import libraries that would link
against `msys_2_0.dll` to correctly link against `msys-2.0.dll` instead.
---
winsup/cygwin/speclib | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index b900960..617a9c2 100755
--- a/winsup/cygwin/speclib
+++ b/winsup/cygwin/speclib
@@ -37,6 +37,7 @@ while (<$nm_fd>) {
study;
if (/ I _?(.*)_dll_iname/o) {
$dllname = $1;
+ $dllname =~ s/_2_0/-2.0/;
} else {
my ($file, $member, $symbol) = m%^([^:]*):([^:]*(?=:))?.* T (.*)%o;
next if !defined($symbol) || $symbol =~ $exclude_regex;
--
2.35.1