···1+From 69a6ab80cf0908c2a44430c297932ef3659a1655 Mon Sep 17 00:00:00 2001
2+From: Jiajie Chen <c@jia.je>
3+Date: Wed, 22 Jun 2022 16:24:10 +0800
4+Subject: [PATCH 1/2] Fix detection of quartz in gdk-3.0 target
5+6+The GTK+3 built by Nix targets ``broadway quartz`` instead of only `quartz`,
7+thus the target check is wrong. The script is modified to look up `quartz` in a
8+loop. The variable name is renamed to `targets` in `gdk-3.0.pc` as well.
9+10+---
11+ configure | 6 +++++-
12+ 1 file changed, 5 insertions(+), 1 deletion(-)
13+14+diff --git a/configure b/configure
15+index 628a80f..9cb88d5 100755
16+--- a/configure
17++++ b/configure
18+@@ -7361,7 +7361,10 @@ $as_echo "yes" >&6; }
19+ fi
20+ GTK_VER=`$PKG_CONFIG gtk+-3.0 --modversion`
21+22+- _gdk_tgt=`$PKG_CONFIG --variable=target gdk-3.0`
23++ # gdk-3.0 may have multiple targets e.g. "broadway quartz"
24++ _gdk_tgts=`$PKG_CONFIG --variable=targets gdk-3.0`
25++ for _gdk_tgt in $_gdk_tgts;
26++ do
27+ if test "x$_gdk_tgt" = xquartz; then
28+29+ pkg_failed=no
30+@@ -7466,6 +7469,7 @@ fi
31+ COCOA_GTK_LDFLAGS="-framework Cocoa -framework ApplicationServices"
32+33+ fi
34++ done
35+36+ if test x$with_gconf = xyes; then
37+38+--
39+2.36.1
40+