commit:     9ce91430dd2d8e4f57c8b6366d0aa810c0d90cb8
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 11 06:23:49 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Aug 11 10:00:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ce91430

app-emulation/wine-vanilla: fix build with clang:17

Was silently ignored with <clang-16, but clang:17 now considers this
an error.

Working -mabi=ms is required with USE=-mingw, but with USE=mingw seems
it gets used in install phase possibly(?) by mistake. As a quick fix,
drop the option for now. Prefer to leave alone for gcc, so done in
ebuild w/ tc-is-clang.

Also add an early abort for USE=-mingw while here, this was always
failing due to missing -mabi=ms even with older clang.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild   | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild   | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild   | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild    | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild    | 12 ++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-9999.ebuild    | 12 ++++++++++++
 7 files changed, 84 insertions(+)

diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild
index 31bb2a4e7fdf..eee523c84dde 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild
@@ -171,6 +171,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild
index 289ad34feeb6..aed49df3605b 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild
@@ -169,6 +169,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild
index b8679687d7f1..ca24322d73fc 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild
@@ -169,6 +169,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild
index 28ee8cb167cc..9573a0a88c0b 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild
@@ -173,6 +173,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild
index 28ee8cb167cc..9573a0a88c0b 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild
@@ -173,6 +173,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
index 9f0672c16b6e..dbe3af0eae78 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
@@ -181,6 +181,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild 
b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
index 9f0672c16b6e..dbe3af0eae78 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild
@@ -181,6 +181,18 @@ src_prepare() {
 
        default
 
+       if tc-is-clang; then
+               if use mingw; then
+                       # -mabi=ms was ignored by <clang:16 then turned error 
in :17
+                       # and it still gets used in install phase despite 
USE=mingw,
+                       # drop as a quick fix for now which hopefully should be 
safe
+                       sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+               else
+                       # ./configure will abort looking for -mabi=ms, so do it 
early
+                       die "building ${PN} with clang requires USE=mingw to be 
enabled"
+               fi
+       fi
+
        # ensure .desktop calls this variant + slot
        sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
 

Reply via email to