commit:     23a6d260ee7a72fc42d36d6311a137fa3c55bcdc
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 11:34:00 2023 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 19:57:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a6d260

x11-libs/wxGTK: Remove broken flag deduplication logic in 3.2.2.1

Closes: https://bugs.gentoo.org/903668
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 .../files/wxGTK-3.2.2.1-dont-break-flags.patch     | 48 ++++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild             |  1 +
 2 files changed, 49 insertions(+)

diff --git a/x11-libs/wxGTK/files/wxGTK-3.2.2.1-dont-break-flags.patch 
b/x11-libs/wxGTK/files/wxGTK-3.2.2.1-dont-break-flags.patch
new file mode 100644
index 000000000000..db351b29d648
--- /dev/null
+++ b/x11-libs/wxGTK/files/wxGTK-3.2.2.1-dont-break-flags.patch
@@ -0,0 +1,48 @@
+From f092f50b794b487e552e930b11d165a736fc8edb Mon Sep 17 00:00:00 2001
+From: Arsen Arsenović <[email protected]>
+Date: Sun, 2 Apr 2023 13:25:11 +0200
+Subject: [PATCH] configure: Remove flag deduplication logic
+
+Parsing compiler flags is a complex task that this function screws up.
+
+Bug: https://bugs.gentoo.org/903668
+---
+ configure    | 5 ++---
+ configure.in | 5 ++---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/configure b/configure
+index a476a3c..a9b815b 100755
+--- a/configure
++++ b/configure
+@@ -45550,9 +45550,8 @@ esac
+ 
+ dedup_flags()
+ {
+-    printf "%s " "$@" |
+-        awk 'BEGIN { RS=" "; ORS=" " }
+-            { if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }'
++      # Gentoo: Don't hack out flags, parsing them is complex.
++      printf '%s ' "$@"
+ }
+ 
+ WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
+diff --git a/configure.in b/configure.in
+index a4c4178..9cf9c30 100644
+--- a/configure.in
++++ b/configure.in
+@@ -8570,9 +8570,8 @@ dnl flags which are explicitly allowed to occur multiple 
times, as all their
+ dnl occurrences must be preserved).
+ dedup_flags()
+ {
+-    printf "%s " "$@" |
+-        awk 'BEGIN { RS=" "; ORS=" " }
+-            { if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }'
++      # Gentoo: Don't hack out flags, parsing them is complex.
++      printf '%s ' "$@"
+ }
+ 
+ WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
+-- 
+2.40.0
+

diff --git a/x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild 
b/x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild
index 8071c1a865b4..7a0988e01d87 100644
--- a/x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild
@@ -83,6 +83,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-3.2.1-configure-tests.patch"
        "${FILESDIR}/${PN}-3.2.1-wayland-control.patch"
        "${FILESDIR}/${PN}-3.2.1-prefer-lib64-in-tests.patch"
+       "${FILESDIR}/${PN}-3.2.2.1-dont-break-flags.patch"
 )
 
 src_prepare() {

Reply via email to