···11+From 69a6ab80cf0908c2a44430c297932ef3659a1655 Mon Sep 17 00:00:00 2001
22+From: Jiajie Chen <c@jia.je>
33+Date: Wed, 22 Jun 2022 16:24:10 +0800
44+Subject: [PATCH 1/2] Fix detection of quartz in gdk-3.0 target
55+66+The GTK+3 built by Nix targets ``broadway quartz`` instead of only `quartz`,
77+thus the target check is wrong. The script is modified to look up `quartz` in a
88+loop. The variable name is renamed to `targets` in `gdk-3.0.pc` as well.
99+1010+---
1111+ configure | 6 +++++-
1212+ 1 file changed, 5 insertions(+), 1 deletion(-)
1313+1414+diff --git a/configure b/configure
1515+index 628a80f..9cb88d5 100755
1616+--- a/configure
1717++++ b/configure
1818+@@ -7361,7 +7361,10 @@ $as_echo "yes" >&6; }
1919+ fi
2020+ GTK_VER=`$PKG_CONFIG gtk+-3.0 --modversion`
2121+2222+- _gdk_tgt=`$PKG_CONFIG --variable=target gdk-3.0`
2323++ # gdk-3.0 may have multiple targets e.g. "broadway quartz"
2424++ _gdk_tgts=`$PKG_CONFIG --variable=targets gdk-3.0`
2525++ for _gdk_tgt in $_gdk_tgts;
2626++ do
2727+ if test "x$_gdk_tgt" = xquartz; then
2828+2929+ pkg_failed=no
3030+@@ -7466,6 +7469,7 @@ fi
3131+ COCOA_GTK_LDFLAGS="-framework Cocoa -framework ApplicationServices"
3232+3333+ fi
3434++ done
3535+3636+ if test x$with_gconf = xyes; then
3737+3838+--
3939+2.36.1
4040+