summaryrefslogtreecommitdiffstats
path: root/packaging/macos/modulesets
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /packaging/macos/modulesets
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/macos/modulesets')
-rw-r--r--packaging/macos/modulesets/README.md8
-rw-r--r--packaging/macos/modulesets/gtk-osx-bootstrap.modules119
-rw-r--r--packaging/macos/modulesets/gtk-osx-gtkmm.modules80
-rw-r--r--packaging/macos/modulesets/gtk-osx-network.modules153
-rw-r--r--packaging/macos/modulesets/gtk-osx-python.modules150
-rw-r--r--packaging/macos/modulesets/gtk-osx-random.modules168
-rw-r--r--packaging/macos/modulesets/gtk-osx.modules336
-rw-r--r--packaging/macos/modulesets/inkscape.modules371
-rw-r--r--packaging/macos/modulesets/jhbuildrc4
l---------packaging/macos/modulesets/moduleset.dtd1
l---------packaging/macos/modulesets/moduleset.xsl1
-rw-r--r--packaging/macos/modulesets/patches/Quartz-version-detection-for-macOS-12.patch67
-rw-r--r--packaging/macos/modulesets/patches/README.md3
-rw-r--r--packaging/macos/modulesets/patches/cairo-color_mgmt_perf.patch472
-rw-r--r--packaging/macos/modulesets/patches/cairo-pixman_dithering.patch659
-rw-r--r--packaging/macos/modulesets/patches/cairo-snapshot_leak.patch27
-rw-r--r--packaging/macos/modulesets/patches/enchant-relocatable.patch38
-rw-r--r--packaging/macos/modulesets/patches/frodo-getopt-autotools.patch28
-rw-r--r--packaging/macos/modulesets/patches/gdk-pixbuf-loader-name.patch25
-rw-r--r--packaging/macos/modulesets/patches/ghostscript_configure_libtiff.patch11
-rw-r--r--packaging/macos/modulesets/patches/ghostscript_link_cupsimage.patch11
-rw-r--r--packaging/macos/modulesets/patches/graphviz-remove-rpath.patch55
-rw-r--r--packaging/macos/modulesets/patches/gspell-makefile_objc.patch20
-rw-r--r--packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch59
-rw-r--r--packaging/macos/modulesets/patches/gtk+-scale-absolute-value.patch32
-rw-r--r--packaging/macos/modulesets/patches/gtk-3.24.33-quartz-window-transient-for.patch46
-rw-r--r--packaging/macos/modulesets/patches/gtk-3.24.33-remove-gtk4-update-icon-cache-dependency.patch10
-rw-r--r--packaging/macos/modulesets/patches/gtk-mac-bundler_configure.patch24
-rw-r--r--packaging/macos/modulesets/patches/gtkmm-3-bad-const-property-background.patch13
-rw-r--r--packaging/macos/modulesets/patches/imagemagick_configure_pango.patch18
-rw-r--r--packaging/macos/modulesets/patches/itstool-config-python.patch14
-rw-r--r--packaging/macos/modulesets/patches/libtasn1-inline-fix.patch10
-rw-r--r--packaging/macos/modulesets/patches/libxml2-python-config.patch23
-rw-r--r--packaging/macos/modulesets/patches/pango-coretext-fix-clang-build-failure.patch30
-rw-r--r--packaging/macos/modulesets/patches/rust_cmake_install.patch27
-rw-r--r--packaging/macos/modulesets/patches/shared-mime-info-2.1-freedesktop-generate.patch27
-rw-r--r--packaging/macos/modulesets/patches/tiff-nohtml.patch44
-rw-r--r--packaging/macos/modulesets/patches/xmlto-allow-net-access.patch27
38 files changed, 3211 insertions, 0 deletions
diff --git a/packaging/macos/modulesets/README.md b/packaging/macos/modulesets/README.md
new file mode 100644
index 0000000..7f1031f
--- /dev/null
+++ b/packaging/macos/modulesets/README.md
@@ -0,0 +1,8 @@
+# JHBuild module set
+
+The module sets prefixed with `gtk-osx` are customized copies from [gtk-osx](https://gitlab.gnome.org/GNOME/gtk-osx). They differ from their upstream versions as follows:
+
+- Remove any module that we don't need to simplify maintainability.
+- Update a few select modules to other/newer versions, but don't needlessly divert from upstream. This way we can still benefit from using a largely identical base configuration in terms of stability, required patches etc.
+
+The module set `inkscape.modules` has been created from scratch to manage Inkscape's dependencies that are not part of [gtk-osx](https://gitlab.gnome.org/GNOME/gtk-osx).
diff --git a/packaging/macos/modulesets/gtk-osx-bootstrap.modules b/packaging/macos/modulesets/gtk-osx-bootstrap.modules
new file mode 100644
index 0000000..6127d99
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx-bootstrap.modules
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+
+ <repository type="tarball" name="ftp.gnome.org" default="yes"
+ href="http://download.gnome.org/sources/"/>
+ <repository type="tarball" name="ftp.gnu.org" href="https://ftp.gnu.org/gnu/"/>
+ <repository type="tarball" name="sourceforge"
+ href="http://downloads.sourceforge.net/sourceforge/"/>
+ <repository type="tarball" name="jpeg"
+ href="https://www.fossies.org/"/>
+ <repository type="tarball" name="libtiff"
+ href="http://download.osgeo.org/"/>
+ <repository type="tarball" name="icon-theme"
+ href="http://icon-theme.freedesktop.org/releases/"/>
+ <repository type="tarball" name="xmlsoft.org"
+ href="ftp://xmlsoft.org/libxml2/"/>
+ <repository type="git" name="git.gnome.org"
+ href="https://gitlab.gnome.org/GNOME"/>
+ <repository type="tarball" name="itstool" href="http://files.itstool.org/"/>
+ <repository type="tarball" name="github-tarball" href="https://github.com/"/>
+
+ <autotools id="libpng" autogenargs="--enable-shared" autogen-sh="configure">
+ <branch version="1.6.37" module="libpng/libpng-1.6.37.tar.xz"
+ hash="sha256:505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca"
+ repo="sourceforge"/>
+ <dependencies>
+ <dep package="zlib"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="libjpeg" autogen-sh="configure">
+ <branch module="linux/misc/jpegsrc.v9e.tar.gz" version="9e"
+ repo="jpeg" checkoutdir="jpeg-9e"
+ hash="sha256:4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d">
+ </branch>
+ </autotools>
+
+ <autotools id="libtiff" autogen-sh="configure" autogenargs="--without-x">
+ <branch version="4.2.0" module="libtiff/tiff-4.2.0.tar.gz"
+ repo="libtiff"
+ hash="sha256:eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb">
+ <patch file="tiff-nohtml.patch" strip="1" />
+ </branch>
+ <dependencies>
+ <dep package="libjpeg"/>
+ </dependencies>
+ </autotools>
+
+ <!-- The python package is in gtk-osx-python.modules. If you're
+ building "native" you can safely add python to the skip list, but
+ otherwise the links in the SDKs are messed up and libxml's python
+ module won't link. In case you're wondering, itstool
+ needs libxml2's python module. -->
+
+ <autotools id="libxml2" autogen-sh="autoreconf"
+ autogenargs='--libdir="$JHBUILD_LIBDIR" --with-python'>
+ <branch version="2.9.12" module="libxml2-2.9.12.tar.gz"
+ repo="xmlsoft.org"
+ hash="sha256:c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92">
+ <patch file="libxml2-python-config.patch" strip="1"/>
+ </branch>
+ <after>
+ <dep package="python3"/>
+ </after>
+ </autotools>
+
+ <autotools id="libxslt" autogen-sh="configure">
+ <branch version="1.1.34" module="libxslt-1.1.34.tar.gz"
+ hash="sha256:98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f"
+ repo="xmlsoft.org"/>
+ <dependencies>
+ <dep package="libxml2"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="itstool" autogen-sh="configure">
+ <branch module="itstool/itstool-2.0.6.tar.bz2" version="2.0.6n"
+ repo="itstool"
+ hash="sha256:6233cc22726a9a5a83664bf67d1af79549a298c23185d926c3677afa917b92a9">
+ <patch file="itstool-config-python.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="libxml2"/>
+ </dependencies>
+ </autotools>
+
+ <meson id="gtk-doc" mesonargs="-Dyelp_manual=false -Dtests=false">
+ <branch version="1.33.2" module="gtk-doc/1.33/gtk-doc-1.33.2.tar.xz"
+ hash="sha256:cc1b709a20eb030a278a1f9842a362e00402b7f834ae1df4c1998a723152bf43"/>
+ <dependencies>
+ <dep package="libxml2"/>
+ <dep package="libxslt"/>
+ <dep package="itstool"/>
+ </dependencies>
+ <after>
+ <dep package="python3"/>
+ <dep package="pygments"/>
+ </after>
+ </meson>
+
+ <autotools id="icu" autogen-sh="source/configure" autogenargs="--enable-rpath"
+ makeargs='CFLAGS="$CFLAGS -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0"'>
+ <branch repo="github-tarball" version="68.2" checkoutdir="icu"
+ module="unicode-org/icu/releases/download/release-68-2/icu4c-68_2-src.tgz"
+ hash="sha256:c79193dee3907a2199b8296a93b52c5cb74332c26f3d167269487680d479d625"/>
+ </autotools>
+
+ <metamodule id="meta-gtk-osx-bootstrap">
+ <dependencies>
+ <dep package="libpng"/>
+ <dep package="libjpeg"/>
+ <dep package="libtiff"/>
+ <dep package="gtk-doc"/>
+ </dependencies>
+ </metamodule>
+
+</moduleset>
diff --git a/packaging/macos/modulesets/gtk-osx-gtkmm.modules b/packaging/macos/modulesets/gtk-osx-gtkmm.modules
new file mode 100644
index 0000000..c220242
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx-gtkmm.modules
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+ <repository type="tarball" name="ftp.gnome.org" default="yes"
+ href="http://ftp.gnome.org/pub/GNOME/sources/"/>
+ <repository type="tarball" name="doxygen"
+ href="http://ftp.stack.nl/pub/users/dimitri/"/>
+ <repository type="tarball" name="cairographics"
+ href="http://cairographics.org/releases/"/>
+
+
+ <meson id="mm-common">
+ <branch module="mm-common/1.0/mm-common-1.0.2.tar.xz" version="1.0.2"
+ hash="sha256:a2a99f3fa943cf662f189163ed39a2cfc19a428d906dd4f92b387d3659d1641d"/>
+ </meson>
+
+ <!-- Libsigc++ was rewritten to use C++17 variadic templates for version 3, and adopting that has created substantial API breaks for the whole "mm" stack. gtkmm2 and gtkmm3 use the older versions, gtkmm4 the new ones.
+ Note that C++17 is supported only on macOS-10.13 and later.
+ -->
+ <meson id="cairomm-1.14">
+ <branch module="cairomm-1.14.2.tar.xz" version="1.14.2"
+ repo="cairographics"
+ hash="sha256:0126b9cc295dc36bc9c0860d5b720cb5469fd78d5620c8f10cc5f0c07b928de3"/>
+ <dependencies>
+ <dep package="cairo"/>
+ </dependencies>
+ </meson>
+
+ <autotools id="glibmm-2.4" autogen-sh="autoreconf">
+ <branch module="glibmm/2.60/glibmm-2.60.0.tar.xz" version="2.60.0"
+ hash="sha256:a3a1b1c9805479a16c0018acd84b3bfff23a122aee9e3c5013bb81231aeef2bc"/>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="libsigc++2"/>
+ <dep package="mm-common"/>
+ </dependencies>
+ </autotools>
+
+ <meson id="pangomm-1.4">
+ <branch module="pangomm/2.46/pangomm-2.46.2.tar.xz" version="2.46.2"
+ hash="sha256:57442ab4dc043877bfe3839915731ab2d693fc6634a71614422fb530c9eaa6f4"/>
+ <dependencies>
+ <dep package="glibmm-2.4"/>
+ <dep package="cairomm-1.14"/>
+ <dep package="pango"/>
+ </dependencies>
+</meson>
+
+ <meson id="atkmm-1.6">
+ <branch module="atkmm/2.28/atkmm-2.28.1.tar.xz" version="2.28.1"
+ hash="sha256:116876604770641a450e39c1f50302884848ce9cc48d43c5dc8e8efc31f31bad"/>
+ <dependencies>
+ <dep package="glibmm-2.4"/>
+ <dep package="cairomm-1.14"/>
+ <dep package="pangomm-1.4"/>
+ <dep package="atk"/>
+ </dependencies>
+ </meson>
+
+ <meson id="libsigc++2" >
+ <branch module="libsigc++/2.10/libsigc++-2.10.6.tar.xz" version="2.10.6"
+ hash="sha256:dda176dc4681bda9d5a2ac1bc55273bdd381662b7a6d49e918267d13e8774e1b"/>
+ </meson>
+
+ <meson id="gtkmm3" >
+ <branch module="gtkmm/3.24/gtkmm-3.24.5.tar.xz" version="3.24.5"
+ hash="sha256:856333de86689f6a81c123f2db15d85db9addc438bc3574c36f15736aeae22e6">
+ <patch file="gtkmm-3-bad-const-property-background.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glibmm-2.4"/>
+ <dep package="cairomm-1.14"/>
+ <dep package="pangomm-1.4"/>
+ <dep package="atkmm-1.6"/>
+ <dep package="gtk+-3.0"/>
+ </dependencies>
+ </meson>
+
+</moduleset>
diff --git a/packaging/macos/modulesets/gtk-osx-network.modules b/packaging/macos/modulesets/gtk-osx-network.modules
new file mode 100644
index 0000000..3e12ae5
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx-network.modules
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+ <repository name="ftp.gnome.org" type="tarball" default="yes"
+ href="http://ftp.gnome.org/pub/GNOME/sources/"/>
+ <repository name="openssl" type="tarball"
+ href="https://www.openssl.org/source/"/>
+ <repository name="ftp.gnu.org" type="tarball"
+ href="https://ftp.gnu.org/gnu/"/>
+ <repository name="sourceforge" type="tarball"
+ href="http://downloads.sourceforge.net/sourceforge/"/>
+ <repository name='gnupg.org' type='tarball' href="https://gnupg.org/ftp/" />
+ <repository name="webm" type="tarball"
+ href="http://downloads.webmproject.org/releases/"/>
+ <repository type="tarball" name="github-tarball" href="https://github.com/"/>
+ <repository type="tarball" name="zlib" href="https://www.zlib.net/"/>
+
+ <!-- of the many arguments such as prefix and libdir that jhbuild might pass
+ to configure, openssl only understands prefix, and only with =. -->
+ <autotools id="openssl" autogen-sh="Configure" autogenargs="shared "
+ autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --openssldir=%(prefix)s/etc/ssl %(autogenargs)s"
+ makeinstallargs="install_sw" supports-non-srcdir-builds="no">
+ <branch module="openssl-1.1.1s.tar.gz" version="1.1.1s" repo="openssl"
+ hash="sha256:c5ac01e760ee6ff0dab61d6b2bbd30146724d063eb322180c6f18a6f74e4b6aa"/>
+ </autotools>
+
+ <!-- Rudely demands TeX to build documentation -->
+ <!-- libnettle 3.7 doesn't have arm64 assembler support and the support that's added in master is for arm-64-neutron that's incompatible with Apple Silicon. -->
+ <if condition-set="arm64">
+ <autotools id="libnettle" autogen-sh="configure"
+ autogenargs="--disable-documentation --disable-assembler">
+ <branch repo="ftp.gnu.org" version="3.7.2"
+ module="nettle/nettle-3.7.2.tar.gz"
+ hash="sha256:8d2a604ef1cde4cd5fb77e422531ea25ad064679ff0adf956e78b3352e0ef162">
+ </branch>
+ <dependencies>
+ <dep package="gmp"/>
+ <dep package="openssl"/>
+ </dependencies>
+ </autotools>
+ </if>
+ <if condition-unset="arm64">
+ <autotools id="libnettle" autogen-sh="configure"
+ autogenargs="--disable-documentation">
+ <branch repo="ftp.gnu.org" version="3.7.2"
+ module="nettle/nettle-3.7.2.tar.gz"
+ hash="sha256:8d2a604ef1cde4cd5fb77e422531ea25ad064679ff0adf956e78b3352e0ef162">
+ </branch>
+ <dependencies>
+ <dep package="gmp"/>
+ <dep package="openssl"/>
+ </dependencies>
+ </autotools>
+ </if>
+
+ <autotools id="libtasn1" autogen-sh="configure">
+ <branch repo="ftp.gnu.org" version="4.17.0"
+ module="libtasn1/libtasn1-4.17.0.tar.gz"
+ hash="sha256:ece7551cea7922b8e10d7ebc70bc2248d1fdd73351646a2d6a8d68a9421c45a5">
+ <patch file="libtasn1-inline-fix.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <cmake id="zlib">
+ <branch repo="zlib" version="1.2.13"
+ module="zlib-1.2.13.tar.xz"
+ hash="sha256:d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98"/>
+ </cmake>
+
+ <autotools id="p11-kit" autogen-sh="configure"
+ autogenargs="--without-trust-paths">
+ <branch repo="github-tarball" version="0.23.22"
+ module="p11-glue/p11-kit/releases/download/0.23.22/p11-kit-0.23.22.tar.xz"
+ hash="sha256:8a8f40153dd5a3f8e7c03e641f8db400133fb2a6a9ab2aee1b6d0cb0495ec6b6">
+ </branch>
+ <dependencies>
+ <dep package="libffi"/>
+ <dep package="libtasn1"/>
+ </dependencies>
+ </autotools>
+
+ <if condition-unset="pre-Mavericks">
+ <autotools id="gnutls" autogen-sh="autoreconf"
+ autogenargs="--disable-gtk-doc-html --with-included-unistring">
+ <branch repo="gnupg.org" version="3.7.7"
+ module="gcrypt/gnutls/v3.7/gnutls-3.7.7.tar.xz">
+ </branch>
+ <dependencies>
+ <dep package="libnettle"/>
+ <dep package="libtasn1"/>
+ <dep package="zlib"/>
+ <dep package="p11-kit"/>
+ <dep package="libgcrypt"/>
+ </dependencies>
+ </autotools>
+ </if>
+
+ <autotools id="libgpg-error" autogen-sh="autoreconf"
+ autogenargs="--disable-doc">
+ <branch repo="gnupg.org" version="1.42"
+ module="gcrypt/libgpg-error/libgpg-error-1.42.tar.bz2"
+ hash="sha256:fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23">
+ </branch>
+ </autotools>
+
+ <autotools id="libgcrypt" autogen-sh="configure">
+ <branch repo="gnupg.org" version="1.9.2"
+ module="gcrypt/libgcrypt/libgcrypt-1.9.2.tar.bz2"
+ hash="sha256:b2c10d091513b271e47177274607b1ffba3d95b188bbfa8797f948aec9053c5a"/>
+ <dependencies>
+ <dep package="libgpg-error"/>
+ </dependencies>
+ </autotools>
+
+
+ <meson id="glib-networking" mesonargs="-Dopenssl=enabled">
+ <branch module="glib-networking/2.68/glib-networking-2.68.0.tar.xz"
+ version="2.68.0"
+ hash="sha256:0b235e85ad26b3c0d12255d0963c460e5a639c4722f78e2a03e969e224b29f6e"/>
+ <dependencies>
+ <if condition-unset="pre-Mavericks">
+ <dep package="gnutls"/>
+ </if>
+ <dep package="glib"/>
+ </dependencies>
+ </meson>
+
+ <autotools id="libpsl" autogen-sh='configure'>
+ <branch repo="github-tarball" version="0.21.0"
+ module="rockdaboot/libpsl/releases/download/0.21.1/libpsl-0.21.1.tar.gz"
+ hash="sha256:ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c"/>
+ </autotools>
+
+ <meson id="libsoup" mesonargs="-Dvapi=disabled">
+ <branch module="libsoup/2.72/libsoup-2.72.0.tar.xz" version="2.72.0"
+ hash="sha256:170c3f8446b0f65f8e4b93603349172b1085fb8917c181d10962f02bb85f5387">
+ </branch>
+ <dependencies>
+ <dep package="libpsl"/>
+ <dep package="python3"/>
+ <dep package="glib"/>
+ <dep package="glib-networking"/>
+ <dep package="sqlite"/>
+ <dep package="vala"/>
+ </dependencies>
+ </meson>
+
+ <autotools id="libwebp" autogen-sh="configure" autogenargs="--enable-libwebpmux --enable-libwebpdecoder">
+ <branch repo="webm" module="webp/libwebp-1.2.0.tar.gz" version="1.2.0"
+ hash="sha256:2fc8bbde9f97f2ab403c0224fb9ca62b2e6852cbc519e91ceaa7c153ffd88a0c"/>
+ </autotools>
+</moduleset>
diff --git a/packaging/macos/modulesets/gtk-osx-python.modules b/packaging/macos/modulesets/gtk-osx-python.modules
new file mode 100644
index 0000000..2d5ff96
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx-python.modules
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+
+ <repository type="tarball" name="ftp.gnome.org" default="yes"
+ href="http://ftp.gnome.org/pub/GNOME/sources/"/>
+ <repository type="tarball" name="cairographics.org"
+ href="http://cairographics.org/releases/"/>
+ <repository type="tarball" name="python"
+ href="https://www.python.org/ftp/python/"/>
+ <repository type="tarball" name="oracle"
+ href="http://download.oracle.com/"/>
+ <repository type="tarball" name="pymodules"
+ href="https://pypi.python.org/packages/"/>
+ <repository type="tarball" name="github-tarball"
+ href="https://github.com"/>
+
+ <metamodule id="meta-gtk-osx-python3-gtk3">
+ <dependencies>
+ <dep package="pycairo"/>
+ <dep package="pygobject3"/>
+ </dependencies>
+ <after>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </after>
+ </metamodule>
+
+ <autotools id="python3" autogenargs="--enable-shared" autogen-sh="configure">
+ <branch repo="python" module="3.10.2/Python-3.10.2.tar.xz" version="3.10.2"
+ hash="sha256:17de3ac7da9f2519aa9d64378c603a73a0e9ad58dffa8812e45160c086de64c7"/>
+
+ <dependencies>
+ <dep package='readline'/>
+ <dep package="openssl"/> <!-- For hashlib -->
+ </dependencies>
+ </autotools>
+
+ <meson id="pycairo">
+ <branch module="/pygobject/pycairo/releases/download/v1.20.0/pycairo-1.20.0.tar.gz" repo="github-tarball"
+ version="1.20.0"
+ hash="sha256:5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c"/>
+ <dependencies>
+ <dep package="cairo"/>
+ <dep package="python3"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </dependencies>
+ </meson>
+
+ <meson id="pygobject3" >
+ <branch version="3.40.1" module="pygobject/3.40/pygobject-3.40.1.tar.xz"
+ hash="sha256:00c6d591f4cb40c335ab1fd3e8c17869ba15cfda54416fe363290af766790035"/>
+ <dependencies>
+ <dep package="pycairo"/>
+ </dependencies>
+ <after>
+ <dep package="python3"/>
+ </after>
+ </meson>
+
+ <distutils id="pygments">
+ <branch repo="pymodules" version="2.9.0"
+ module="ba/6e/7a7c13c21d8a4a7f82ccbfe257a045890d4dbf18c023f985f565f97393e3/Pygments-2.9.0.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="docutils">
+ <branch repo="pymodules" version="0.18.1"
+ module="57/b1/b880503681ea1b64df05106fc7e3c4e3801736cf63deffc6fa7fc5404cf5/docutils-0.18.1.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="gidocgen">
+ <branch repo="pymodules" version="2022.1"
+ module="25/11/64ea759ba610d7442e8827306d1adba233ca69547d2a0e974f5ea74fa320/gi-docgen-2022.1.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ <dep package="markdown"/>
+ <dep package="markupsafe"/>
+ <dep package="typogrify"/>
+ <dep package="jinja2"/>
+ <dep package="toml"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="markdown">
+ <branch repo="pymodules" version="3.3.6"
+ module="15/06/d60f21eda994b044cbd496892d4d4c5c708aa597fcaded7d421513cb219b/Markdown-3.3.6.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="markupsafe">
+ <branch repo="pymodules" version="2.1.1"
+ module="1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="typogrify">
+ <branch repo="pymodules" version="2.0.7"
+ module="8a/bf/64959d6187d42472acb846bcf462347c9124952c05bd57e5769d5f28f9a6/typogrify-2.0.7.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ <dep package="smartypants"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="jinja2">
+ <branch repo="pymodules" version="3.1.1"
+ module="89/e3/b36266381ae7a1310a653bb85f4f3658c462a69634fa9b2fef76252a50ed/Jinja2-3.1.1.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="toml">
+ <branch repo="pymodules" version="0.10.2"
+ module="be/ba/1f744cdc819428fc6b5084ec34d9b30660f6f9daaf70eead706e3203ec3c/toml-0.10.2.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+ <distutils id="smartypants">
+ <branch repo="github-tarball" version="2.0.1"
+ module="leohemsted/smartypants.py/archive/refs/tags/v2.0.1.tar.gz"
+ rename-tarball="smartypants-2.0.1.tar.gz"
+ checkoutdir="smartypants-2.0.1">
+ </branch>
+ <dependencies>
+ <dep package="python3"/>
+ </dependencies>
+ </distutils>
+
+</moduleset>
diff --git a/packaging/macos/modulesets/gtk-osx-random.modules b/packaging/macos/modulesets/gtk-osx-random.modules
new file mode 100644
index 0000000..4811a0d
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx-random.modules
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+ <repository type="tarball" name="ftp.gnome.org" default="yes"
+ href="http://download.gnome.org/sources/"/>
+ <repository type="tarball" name="github-tarball" href="https://github.com/"/>
+ <repository type="tarball" name="ftp.gnu.org" href="https://ftp.gnu.org/gnu/"/>
+
+ <repository type="tarball" name="shared-mime-info"
+ href="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/"/>
+ <repository type="tarball" name="iso-codes"
+ href="https://salsa.debian.org/iso-codes-team/iso-codes/uploads/"/>
+ <repository type="tarball" name="sourceforge"
+ href="http://downloads.sourceforge.net/sourceforge/"/>
+ <repository type="tarball" name="graphviz"
+ href="https://gitlab.com/graphviz/graphviz/-/archive/"/>
+ <repository type="tarball" name="sqlite" href="http://www.sqlite.org/"/>
+ <repository type="tarball" name="frodo"
+ href="http://frodo.looijaard.name/system/files/software/"/>
+ <repository type="tarball" name="paguire" href="https://releases.pagure.org/"/>
+ <repository type="tarball" name="pcre" href="https://ftp.pcre.org/pub/"/>
+
+ <cmake id="graphviz">
+ <branch module="2.47.0/graphviz-2.47.0.tar.bz2" version="2.47.0"
+ repo="graphviz"
+ hash="sha256:dade5b374ce483bf28f2e535baef02280ba8ab86fbe6e93252ab0de48396b714">
+ <patch file="graphviz-remove-rpath.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="pango"/>
+ <dep package="librsvg"/>
+ </dependencies>
+ </cmake>
+
+ <autotools id="vala" autogen-sh="configure">
+ <branch repo="ftp.gnome.org" version="0.52.0"
+ module="vala/0.52/vala-0.52.0.tar.xz"
+ hash="sha256:1de26310db465aca525679d3b5a3c1d8db2e067c4cbc0e5ddd015cd938bac68b"/>
+ <dependencies>
+ <dep package="graphviz"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </dependencies>
+ </autotools>
+
+ <meson id="glade" mesonargs="-Dmac_bundle=true -Dman=false" >
+ <branch module="glade/3.38/glade-3.38.2.tar.xz" version="3.38.2"
+ hash="sha256:98fc87647d88505c97dd2f30f2db2d3e9527515b3af11694787d62a8d28fbab7">
+ </branch>
+ <dependencies>
+ <dep package="itstool"/>
+ <dep package="meta-gtk-osx-gtk3"/>
+ </dependencies>
+ </meson>
+
+ <!-- gtksourceview got a major version ahead: 4.x.x supports recent versions of gtk+-3 and 5.x.x is for gtk4.
+ -->
+ <meson id="gtksourceview3" mesonargs="-Dvapi=false">
+ <branch module="gtksourceview/4.8/gtksourceview-4.8.1.tar.xz"
+ version="4.8.1"
+ hash="sha256:d163d71b5fcafbc5b1eec6dd841edbdbcddd3a7511cd5fdcffd86b8bbfe69ac1">
+ </branch>
+ <dependencies>
+ <dep package="gtk+-3.0"/>
+ </dependencies>
+ </meson>
+
+ <autotools id="frodo-getopt" autogen-sh="configure"
+ supports-non-srcdir-builds="no">
+ <branch repo="frodo" version="1.1.6" module="getopt/getopt-1.1.6.tar.gz"
+ hash="sha256:d0bf1dc642a993e7388a1cddfb9409bed375c21d5278056ccca3a0acd09dc5fe">
+ <patch file="frodo-getopt-autotools.patch" strip="1"/>
+ </branch>
+ </autotools>
+ <autotools id="xmlto" autogen-sh="autoreconf">
+ <branch module="xmlto/xmlto-0.0.28.tar.bz2"
+ version="0.0.28" repo="paguire"
+ hash="sha256:1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276">
+ <patch file="xmlto-allow-net-access.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="frodo-getopt"/>
+ </dependencies>
+ </autotools>
+
+ <meson id="shared-mime-info" supports-non-srcdir-builds="no" >
+ <branch module="0ee50652091363ab0d17e335e5e74fbe/shared-mime-info-2.1.tar.xz"
+ repo="shared-mime-info" version="2.1"
+ hash="sha256:b2d40cfcdd84e835d0f2c9107b3f3e77e9cf912f858171fe779946da634e8563">
+ <patch file="shared-mime-info-2.1-freedesktop-generate.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="xmlto"/>
+ </dependencies>
+ </meson>
+
+ <meson id="gsettings-desktop-schemas">
+ <branch module="gsettings-desktop-schemas/40/gsettings-desktop-schemas-40.0.tar.xz"
+ version="40.0"
+ hash="sha256:f1b83bf023c0261eacd0ed36066b76f4a520bbcb14bb69c402b7959257125685"/>
+ <dependencies>
+ <dep package="gobject-introspection"/>
+ </dependencies>
+ </meson>
+
+<!-- SQLite3 is also available from the macOS SDK -->
+ <autotools id="sqlite" autogenargs="--disable-tcl --enable-threadsafe"
+ autogen-sh="configure">
+ <branch module="2021/sqlite-autoconf-3350400.tar.gz" version='3.35.4'
+ repo="sqlite"
+ hash="sha256:7771525dff0185bfe9638ccce23faa0e1451757ddbda5a6c853bb80b923a512d"/>
+ </autotools>
+
+<!-- Goocanvas2 is for gtk+-3. -->
+
+ <autotools id="goocanvas2" supports-non-srcdir-builds="no">
+ <branch module="goocanvas/2.0/goocanvas-2.0.4.tar.xz" version="2.0.4"
+ hash="sha256:c728e2b7d4425ae81b54e1e07a3d3c8a4bd6377a63cffa43006045bceaa92e90"/>
+ <after>
+ <dep package="gtk+-3.0"/>
+ </after>
+ </autotools>
+
+ <autotools id="hunspell" autogen-sh="autoreconf">
+ <branch module="hunspell/hunspell/archive/v1.7.0.tar.gz" version="1.7.0"
+ repo="github-tarball" checkoutdir="hunspell-1.7.0"
+ rename-tarball="hunspell-1.7.0.tar.gz"
+ hash="sha256:bb27b86eb910a8285407cf3ca33b62643a02798cf2eef468c0a74f6c3ee6bc8a"/>
+ </autotools>
+
+ <autotools id="enchant" autogen-sh="configure"
+ autogenargs="--enable-relocatable" >
+ <branch module="AbiWord/enchant/releases/download/v2.3.3/enchant-2.3.3.tar.gz"
+ repo="github-tarball" version="2.3.3"
+ hash="sha256:3da12103f11cf49c3cf2fd2ce3017575c5321a489e5b9bfa81dd91ec413f3891">
+ <patch file="enchant-relocatable.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ </dependencies>
+ <after>
+ <dep package="hunspell"/>
+ </after>
+ </autotools>
+
+
+ <autotools id="gmp">
+ <branch repo="ftp.gnu.org" module="gmp/gmp-6.2.1.tar.bz2" version="6.2.1"
+ hash="sha256:eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c">
+ </branch>
+ </autotools>
+
+ <autotools id='readline' autogen-sh="configure">
+ <branch repo="ftp.gnu.org" module="readline/readline-8.1.tar.gz"
+ version="8.1"
+ hash="sha256:f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02">
+ </branch>
+ </autotools>
+
+ <autotools id="iso-codes" autogen-sh="configure">
+ <branch module="049ce6aac94d842be809f4063950646c/iso-codes-4.1.tar.xz"
+ version="4.1" repo="iso-codes"
+ hash="sha256:67117fb76f32c8fb5e37d2d60bce238f1f8e865cc7b569a57cbc3017ca15488a"/>
+ </autotools>
+
+</moduleset>
diff --git a/packaging/macos/modulesets/gtk-osx.modules b/packaging/macos/modulesets/gtk-osx.modules
new file mode 100644
index 0000000..f1f6b5f
--- /dev/null
+++ b/packaging/macos/modulesets/gtk-osx.modules
@@ -0,0 +1,336 @@
+<?xml version="1.0"?><!--*- mode: nxml; indent-tabs-mode: nil -*-->
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+ <repository type="tarball" name="ftp.gnome.org" default="yes"
+ href="http://ftp.gnome.org/pub/GNOME/sources/"/>
+ <repository type="tarball" name="cairographics"
+ href="https://www.cairographics.org/"/>
+ <repository type="tarball" name="cairographics-temp"
+ href="https://gitlab.freedesktop.org/cairo/cairo/-/archive/"/>
+ <repository type="tarball" name="ftp.gnu.org"
+ href="https://ftp.gnu.org/gnu/"/>
+ <repository type="tarball" name="xorg"
+ href="https://www.x.org/releases/"/>
+ <repository type="tarball" name="fontconfig"
+ href="http://www.freedesktop.org/software/fontconfig/release/"/>
+ <repository type="tarball" name="hicolor"
+ href="https://icon-theme.freedesktop.org/releases/"/>
+ <repository type="git" name="github" href="https://github.com/"/>
+ <repository type="tarball" name="github-tarball" href="https://github.com/"/>
+ <repository type="tarball" name="sourceforge"
+ href="http://downloads.sourceforge.net/sourceforge/"/>
+ <repository type="system" name="system"/>
+
+ <!-- This module set works a bit differently than for example the
+ GNOME ones do. It's split up in seperate pieces:
+
+ - gtk-osx-bootstrap: contains bootstrap-like modules that you
+ don't want to rebuild all the time.
+
+ - gtk-osx.modules: contains the core GTK+ stack. This does not
+ have a hard dependency on the bootstrap modules, in order to
+ make it easy to rebuild the whole core stack without redoing
+ the bootstrap parts. They have a soft, "after", depencency.
+
+ - gtk-osx-python.modules: Python bindings for Gtk.
+ - gtk-osx-gtkmm.modules: C++ wrappers for Gtk.
+ - gtk-osx-network.modules: The network/crypto stack and WebKit.
+ - gtk-osx-random.modules: "random stuff", has apps for testing GTK+.
+ -->
+
+ <include href="gtk-osx-bootstrap.modules"/>
+ <include href="gtk-osx-gtkmm.modules"/>
+ <include href="gtk-osx-network.modules"/>
+ <include href="gtk-osx-python.modules"/>
+ <include href="gtk-osx-random.modules"/>
+
+ <!-- Dummy meson module to shut up a jhbuild warning. -->
+ <systemmodule id="meson">
+ <branch repo="system"/>
+ </systemmodule>
+
+ <metamodule id="meta-gtk-osx-gtk3">
+ <dependencies>
+ <dep package="gtk+-3.0"/>
+ <dep package="adwaita-icon-theme"/>
+ </dependencies>
+ <after>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </metamodule>
+
+ <autotools id="libffi" autogenargs="--disable-builddir"
+ autogen-sh="configure">
+ <branch module="libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz"
+ repo="github-tarball" version="3.3"
+ hash="sha256:72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056"/>
+ </autotools>
+
+ <autotools id="libpcre" autogen-sh="configure"
+ autogenargs="--enable-unicode-properties --enable-newline-is-any --enable-jit">
+ <branch repo="sourceforge" version="8.45"
+ module="pcre/pcre-8.45.tar.bz2"
+ hash="sha256:4dae6fdcd2bb0bb6c37b5f97c33c2be954da743985369cddac3546e3218bffb8"/>
+ </autotools>
+
+ <meson id="glib" mesonargs="-Dlibmount=disabled">
+ <branch module="glib/2.72/glib-2.72.1.tar.xz" version="2.72.1"
+ hash="sha256:c07e57147b254cef92ce80a0378dc0c02a4358e7de4702e9f403069781095fe2">
+ </branch>
+ <dependencies>
+ <dep package="libffi"/>
+ <dep package="libpcre"/>
+ </dependencies>
+ </meson>
+
+ <!-- To build Freetype *with* harfbuzz requires harfbuzz to be built
+ with freetype so we first have to build it *without* harfbuzz,
+ then build harfbuzz without cairo because cairo requires
+ harfbuzz. -->
+ <cmake id="freetype-no-harfbuzz" cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release">
+ <branch module="freetype/freetype-2.11.1.tar.gz" version="2.11.1"
+ repo="sourceforge"
+ hash="sha256:f8db94d307e9c54961b39a1cc799a67d46681480696ed72ecf78d4473770f09b"/>
+ <dependencies>
+ <dep package="zlib"/>
+ </dependencies>
+ </cmake>
+
+ <meson id="harfbuzz-no-cairo" mesonargs="-Dcoretext=enabled -Ddocs=disabled -Dbenchmark=disabled -Dintrospection=disabled">
+ <branch repo="github-tarball" version="2.9.1"
+ module="harfbuzz/harfbuzz/releases/download/2.9.1/harfbuzz-2.9.1.tar.xz"
+ hash="sha256:0edcc980f526a338452180e701d6aba6323aef457b6686976a7d17ccbddc51cf">
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="freetype-no-harfbuzz"/>
+ <dep package="icu"/>
+ </dependencies>
+ </meson>
+
+ <cmake id="freetype" cmakeargs="-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE -D BUILD_SHARED_LIBS=true -D CMAKE_BUILD_TYPE=Release">
+ <branch module="freetype/freetype-2.11.1.tar.gz" version="2.11.1"
+ repo="sourceforge"/>
+ <dependencies>
+ <dep package="harfbuzz-no-cairo"/>
+ <dep package="zlib"/>
+ </dependencies>
+ </cmake>
+
+ <autotools id="fontconfig" autogen-sh="configure"
+ autogenargs="--disable-docs --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts">
+ <branch repo="fontconfig" version="2.14.0"
+ module="fontconfig-2.14.0.tar.xz"
+ hash="sha256:dcbeb84c9c74bbfdb133d535fe1c7bedc9f2221a8daf3914b984c44c520e9bac"/>
+ <dependencies>
+ <dep package="freetype"/>
+ </dependencies>
+ </autotools>
+
+ <autotools id="pixman" autogenargs="--disable-gtk --disable-mmx"
+ autogen-sh="configure">
+ <branch version="0.40.0" module="releases/pixman-0.40.0.tar.gz"
+ repo="cairographics"
+ hash="sha512:063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f">
+ </branch>
+ <after>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </autotools>
+
+ <!-- cairo doesn't really need fontconfig, but if Pango finds
+ freetype it insists that it has to have fontconfig too and that
+ they are both built into cairo. -->
+ <meson id="cairo">
+ <branch module="1.17.6/cairo-1.17.6.tar.bz2" version="1.17.6"
+ repo="cairographics-temp"
+ hash="sha256:90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2">
+ <patch file="cairo-pixman_dithering.patch" strip="1"/> <!-- Inkscape: packaging/cario.patch -->
+ <patch file="cairo-color_mgmt_perf.patch" strip="1"/> <!-- https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/290 -->
+ <patch file="cairo-snapshot_leak.patch" strip="1"/> <!-- https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/316 -->
+ </branch>
+ <dependencies>
+ <dep package="pixman"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="harfbuzz-no-cairo"/>
+ <dep package="fontconfig"/>
+ </dependencies>
+ </meson>
+
+ <meson id="gobject-introspection">
+ <branch module="gobject-introspection/1.72/gobject-introspection-1.72.0.tar.xz"
+ version="1.72.0"
+ hash="sha256:02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc">
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="cairo"/>
+ </dependencies>
+ <after>
+ <dep package='python3'/>
+ </after>
+ </meson>
+
+ <!--
+ harfbuzz 4.1.0 breaks the following tests for Inkscape:
+ 351 - render_test-glyph-y-pos (Failed)
+ 352 - render_text-glyphs-combining (Failed)
+ 353 - render_text-glyphs-vertical (Failed)
+ 356 - render_test-rtl-vertical (Failed)
+
+ harfbuzz 3.4.0 breaks the following tests for Inkscape:
+ 351 - render_test-glyph-y-pos (Failed)
+ 353 - render_text-glyphs-vertical (Failed)
+ 356 - render_test-rtl-vertical (Failed)
+ -->
+ <meson id="harfbuzz" mesonargs="-Dcoretext=enabled -Ddocs=disabled -Dbenchmark=disabled">
+ <branch repo="github-tarball" version="2.9.1"
+ module="harfbuzz/harfbuzz/releases/download/2.9.1/harfbuzz-2.9.1.tar.xz"
+ hash="sha256:0edcc980f526a338452180e701d6aba6323aef457b6686976a7d17ccbddc51cf"
+>
+ </branch>
+ <dependencies>
+ <dep package="gobject-introspection"/>
+ <dep package="cairo"/>
+ <!-- no longer required as of https://github.com/harfbuzz/harfbuzz/releases/tag/2.8.1
+ <dep package="fontconfig"/>
+ -->
+ </dependencies>
+ </meson>
+
+ <meson id="fribidi" mesonargs="-Ddocs=false">
+ <branch module="fribidi/fribidi/releases/download/v1.0.11/fribidi-1.0.11.tar.xz"
+ repo="github-tarball" version="1.0.11"
+ hash="sha256:30f93e9c63ee627d1a2cedcf59ac34d45bf30240982f99e44c6e015466b4e73d"/>
+ <dependencies>
+ <!--dep package="c2man"/ -->
+ </dependencies>
+ </meson>
+
+ <meson id="pango" mesonargs="-Dfontconfig=enabled">
+ <branch version="1.50.6" module="pango/1.50/pango-1.50.6.tar.xz"
+ hash="sha256:a998bcf36881c3ac20495d40bceb304f4eaa9175bd2967c85656434cbdafe86a">
+ <patch file="pango-coretext-fix-clang-build-failure.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="cairo"/>
+ <dep package="harfbuzz"/>
+ <dep package="fribidi"/>
+ </dependencies>
+ <after>
+ <dep package="gobject-introspection"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </meson>
+
+ <meson id="atk">
+ <branch module="atk/2.36/atk-2.36.0.tar.xz" version="2.36.0"
+ hash="sha256:fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788"/>
+ <dependencies>
+ </dependencies>
+ <after>
+ <dep package="glib"/>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ <dep package="gobject-introspection"/>
+ </after>
+ </meson>
+
+ <!--
+ relocatability breaks two tests in Inkscape
+ - <symbol> geometric properties (SVG 2.0 feature)
+ - .otf font with compressed SVG glyphs
+ <meson id="gdk-pixbuf" mesonargs="-Drelocatable=true -Dman=false">
+ -->
+ <meson id="gdk-pixbuf" mesonargs="-Dman=false">
+
+ <branch module="gdk-pixbuf/2.42/gdk-pixbuf-2.42.8.tar.xz" version="2.42.8"
+ hash="sha256:84acea3acb2411b29134b32015a5b1aaa62844b19c4b1ef8b8971c6b0759f4c6">
+ <patch file="gdk-pixbuf-loader-name.patch" strip="1"/>
+ </branch>
+ <after>
+ <dep package="pango"/>
+ <dep package="gobject-introspection"/>
+ </after>
+ </meson>
+
+ <autotools id="hicolor-icon-theme">
+ <branch module="hicolor-icon-theme-0.17.tar.xz" version="0.17"
+ repo="hicolor"/>
+ </autotools>
+
+ <autotools id="xorg-util-macros">
+ <branch repo="xorg" version="1.19.3"
+ module="individual/util/util-macros-1.19.3.tar.bz2"
+ hash="sha256:0f812e6e9d2786ba8f54b960ee563c0663ddbe2434bf24ff193f5feab1f31971"/>
+ </autotools>
+
+ <meson id="libepoxy">
+ <branch repo="github-tarball" version="1.5.4"
+ hash="sha256:0bd2cc681dfeffdef739cb29913f8c3caa47a88a451fd2bc6e606c02997289d2"
+ module="anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz"/>
+ <dependencies>
+ <dep package="xorg-util-macros"/>
+ </dependencies>
+ </meson>
+
+ <!-- gtk3 is in maintenance mode with 3.24 the final release series. -->
+ <meson id="gtk+-3.0" mesonargs="-Dx11_backend=false">
+ <branch module="gtk+/3.24/gtk+-3.24.34.tar.xz" version="3.24.34"
+ hash="sha256:dbc69f90ddc821b8d1441f00374dc1da4323a2eafa9078e61edbe5eeefa852ec">
+ <patch file="gtk-3.24.33-remove-gtk4-update-icon-cache-dependency.patch" strip="1"/>
+ <patch file="gtk-3.24.33-quartz-window-transient-for.patch" strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="glib"/>
+ <dep package="pango"/>
+ <dep package="atk"/>
+ <dep package="gdk-pixbuf"/>
+ <dep package="gobject-introspection"/>
+ <dep package="libepoxy"/>
+ <dep package="hicolor-icon-theme"/>
+ </dependencies>
+ <after>
+ <dep package="meta-gtk-osx-bootstrap"/>
+ </after>
+ </meson>
+
+ <autotools id="libcroco" autogenargs="--disable-Bsymbolic"
+ autogen-sh="configure">
+ <branch module="libcroco/0.6/libcroco-0.6.13.tar.xz" version="0.6.13"
+ hash="sha256:767ec234ae7aa684695b3a735548224888132e063f92db585759b422570621d4"/>
+ </autotools>
+
+ <autotools id="librsvg" autogen-sh="autoreconf"
+ autogenargs="--disable-Bsymbolic">
+ <branch module="librsvg/2.54/librsvg-2.54.0.tar.xz" version="2.54.0"
+ hash="sha256:baf8ebc147f146b4261bb3d0cd0fac944bf8dbb4b1f2347d23341f974dcc3085"/>
+ <dependencies>
+ <dep package="cairo"/>
+ <dep package="pango"/>
+ <dep package="harfbuzz"/>
+ <dep package="freetype"/>
+ <dep package="rust"/>
+ <dep package="docutils"/>
+ <dep package="gidocgen"/>
+ </dependencies>
+ <after>
+ <!-- Circular dependency if we depend on meta-gtk-osx or meta-gtk-osx-gtk3 -->
+ <dep package="gtk+-3.0"/>
+ </after>
+ </autotools>
+
+ <autotools id="adwaita-icon-theme" autogen-sh="configure">
+ <branch module="adwaita-icon-theme/42/adwaita-icon-theme-42.0.tar.xz"
+ version="42.0"
+ hash="sha256:5e85b5adc8dee666900fcaf271ba717f7dcb9d0a03d96dae08f9cbd27e18b1e0"/>
+ <dependencies>
+ <dep package="librsvg"/>
+ </dependencies>
+ </autotools>
+
+ <!-- Null metamodule, provided so as not to break modules that use it. -->
+ <metamodule id="meta-gtk-osx-freetype" />
+
+</moduleset>
diff --git a/packaging/macos/modulesets/inkscape.modules b/packaging/macos/modulesets/inkscape.modules
new file mode 100644
index 0000000..04763f4
--- /dev/null
+++ b/packaging/macos/modulesets/inkscape.modules
@@ -0,0 +1,371 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+
+ <repository name="boost" type="tarball" href="https://boostorg.jfrog.io/artifactory/main/release/"/>
+ <repository name="freedesktop" type="tarball" href="https://gitlab.freedesktop.org/"/>
+ <repository name="github" type="tarball" href="https://github.com/"/>
+ <repository name="gnome_web" type="tarball" href="https://download.gnome.org/sources/"/>
+ <repository name="gnome_gitlab" type="tarball" href="https://gitlab.gnome.org/GNOME/"/>
+ <repository name="gnu" type="tarball" href="http://ftp.halifax.rwth-aachen.de/gnu/"/>
+ <repository name="libreoffice" type="tarball" href="https://dev-www.libreoffice.org/src/"/>
+ <repository name="poppler" type="tarball" href="https://poppler.freedesktop.org/"/>
+ <repository name="sourceforge" type="tarball" href="https://netcologne.dl.sourceforge.net/project/"/>
+
+ <include href="gtk-osx.modules"/>
+
+ <!-- Boehm-Demers-Weiser Garbage Collector https://github.com/ivmai/bdwgc -->
+ <autotools
+ id="bdwgc"
+ autogen-sh="configure">
+ <branch
+ module="ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz"
+ version="8.0.4"
+ hash="sha256:436a0ddc67b1ac0b0405b61a9675bca9e075c8156f4debd1d06f3a56c7cd289d"
+ repo="github">
+ </branch>
+ </autotools>
+
+ <!-- boost C++ libraries https://www.boost.org
+
+ This is a hackish way of installing boost with JHBuild. Skipping
+ installation means that JHBuild will (re-)install this everytime
+ it gets pulled in.
+ -->
+ <autotools
+ id="boost"
+ autogen-sh="bootstrap.sh"
+ autogenargs="--without-libraries=python"
+ autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s %(autogenargs)s"
+ makeargs="|| ./b2 -d0 install"
+ skip-install="yes"
+ supports-non-srcdir-builds="no">
+ <branch
+ module="1.76.0/source/boost_1_76_0.tar.bz2"
+ version="1.76.0"
+ hash="sha256:f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41"
+ repo="boost">
+ </branch>
+ </autotools>
+
+ <!-- binary<->decimal routines for IEEE doubles https://github.com/google/double-conversion -->
+ <cmake
+ id="doubleconversion">
+ <branch
+ module="google/double-conversion/archive/v3.1.5.tar.gz"
+ version="3.1.5"
+ hash="sha256:a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13"
+ repo="github"
+ checkoutdir="doubleconversion-3.1.5"
+ rename-tarball="doubleconversion-3.1.5.tar.gz">
+ </branch>
+ </cmake>
+
+ <!-- cppunit test framework https://www.freedesktop.org/wiki/Software/cppunit/ -->
+ <autotools
+ id="cppunit"
+ autogen-sh="configure">
+ <branch
+ module="cppunit-1.15.1.tar.gz"
+ version="1.15.1"
+ hash="sha256:89c5c6665337f56fd2db36bc3805a5619709d51fb136e51937072f63fcc717a7"
+ repo="libreoffice">
+ </branch>
+ </autotools>
+
+ <!-- Ghostscript https://www.ghostscript.com
+
+ This has to be removed entirely for GPLv2+ compatibility.
+ -->
+ <autotools
+ id="ghostscript"
+ autogen-sh="configure"
+ autogenargs="--without-tesseract --without-x">
+ <branch
+ module="ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.xz"
+ version="9.56.1"
+ hash="sha256:d43406805650009b42c3d5f6dc535233454533c1e27c13a77dd1d462a056b8e4"
+ repo="github">
+ <patch
+ file="ghostscript_configure_libtiff.patch"
+ strip="1"/>
+ <patch
+ file="ghostscript_link_cupsimage.patch"
+ strip="1"/>
+ </branch>
+ </autotools>
+
+ <!-- Google Testing and Mocking Framework https://github.com/google/googletest -->
+ <cmake
+ id="googletest">
+ <branch
+ module="google/googletest/archive/release-1.12.1.tar.gz"
+ version="1.12.1"
+ hash="sha256:81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2"
+ repo="github"
+ checkoutdir="googletest-1.12.1"
+ rename-tarball="googletest-1.12.1.tar.gz">
+ </branch>
+ </cmake>
+
+ <!-- GNU Scientific Library https://www.gnu.org/software/gsl
+
+ We stick to version 1.9 as this is the last one licensed under GPLv2.
+ -->
+ <autotools
+ id="gsl"
+ autogen-sh='configure CFLAGS="$CFLAGS -Wno-error=implicit-function-declaration"'
+ autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --infodir=%(prefix)s/share/info %(autogenargs)s">
+ <branch
+ module="gsl/gsl-1.9.tar.gz"
+ version="1.9"
+ hash="sha256:fcd1c6784997c2312d922d107fcb30462f5be4335ebdfa8e1e0e07568c962250"
+ repo="gnu">
+ </branch>
+ </autotools>
+
+ <!-- Spell checking for GTK https://wiki.gnome.org/Projects/gspell -->
+ <autotools
+ id="gspell">
+ <branch
+ module="gspell/1.11/gspell-1.11.1.tar.xz"
+ version="1.11.1"
+ hash="sha256:ef6aa4e3f711775158a7e241a5f809cf2426bc0e02c23a7d2b5c71fc3de00292"
+ repo="gnome_web">
+ <patch
+ file="gspell-makefile_objc.patch"
+ strip="1"/>
+ <patch
+ file="gspell-remove_gtkmacintegration.patch"
+ strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="enchant"/>
+ <dep package="glib"/>
+ <dep package="gtk+-3.0"/>
+ <dep package="iso-codes"/>
+ <dep package="vala"/>
+ </dependencies>
+ </autotools>
+
+ <!-- GTK Mac Bundler https://gitlab.gnome.org/GNOME/gtk-mac-bundler
+
+ This is a hackish way of installing GTK Mac Bundler with JHBuild.
+ The patch supplies a mocked configure script that's only interested in
+ taking the prefix and patching the Makefile accordingly. Skipping
+ installation means that JHBuild will (re-)install this everytime
+ it gets pulled in.
+ -->
+ <autotools
+ id="gtkmacbundler"
+ autogen-sh="configure"
+ supports-non-srcdir-builds="no"
+ makeargs="&amp;&amp; make install"
+ skip-install="yes">
+ <branch
+ module="gtk-mac-bundler/-/archive/58d951c8/gtk-mac-bundler-58d951c8.tar.bz2"
+ version="58d951c8"
+ hash="sha256:4617a36dadb7fe9ad242bdd826819e78098a089ccb3c4a002eb7b105ea0ca97c"
+ repo="gnome_gitlab"
+ checkoutdir="gtk-mac-bundler_58d951c8"
+ rename-tarball="gtk-mac-bundler_58d951c8.tar.bz2">
+ <patch
+ file="gtk-mac-bundler_configure.patch"
+ strip="1"/>
+ </branch>
+ </autotools>
+
+ <!-- ImageMagick 6 https://legacy.imagemagick.org -->
+ <autotools
+ id="imagemagick"
+ autogen-sh="configure">
+ <branch
+ module="ImageMagick/ImageMagick6/archive/6.9.12-7.tar.gz"
+ version="6.9.12-7"
+ hash="sha256:6abbd6afe7130edba7652a49c03a699657d6a71cf631a3c82014a31c8f93996d"
+ repo="github"
+ checkoutdir="imagemagick-6.9.12-7"
+ rename-tarball="imagemagick-6.9.12-7.tar.gz">
+ <patch
+ file="imagemagick_configure_pango.patch"
+ strip="1"/>
+ </branch>
+ <dependencies>
+ <dep package="pango"/>
+ </dependencies>
+ </autotools>
+
+ <!-- Little cms color engine https://sourceforge.net/projects/lcms/ -->
+ <autotools
+ id="lcms"
+ autogen-sh="configure">
+ <branch
+ module="lcms/lcms/2.12/lcms2-2.12.tar.gz"
+ version="2.12"
+ hash="sha256:18663985e864100455ac3e507625c438c3710354d85e5cbb7cd4043e11fe10f5"
+ repo="sourceforge"/>
+ </autotools>
+
+ <!-- Reading/Writing CorelDRAW files https://github.com/LibreOffice/libcdr -->
+ <autotools
+ id="libcdr"
+ autogen-sh="autoreconf">
+ <branch
+ module="LibreOffice/libcdr/archive/libcdr-0.1.7.tar.gz"
+ version="0.1.7"
+ hash="sha256:0cfd3304b6ecaaa37fc2fb7213f5e69ab05153152f49e8e91776cd4fc7c09e23"
+ repo="github"
+ checkoutdir="libcdr-0.1.7">
+ </branch>
+ <dependencies>
+ <dep package="boost"/>
+ <dep package="icu"/>
+ <dep package="lcms"/>
+ <dep package="librevenge"/>
+ <dep package="zlib"/>
+ </dependencies>
+ </autotools>
+
+ <!-- base library for document import filters https://sourceforge.net/p/libwpd/wiki/librevenge/ -->
+ <autotools
+ id="librevenge"
+ autogen-sh="configure">
+ <branch
+ module="libwpd/librevenge/librevenge-0.0.4/librevenge-0.0.4.tar.gz"
+ version="0.0.4"
+ hash="sha256:a2718efd86000fe769cb6178478af0fd424a9128807361241facd2491bcb772f"
+ repo="sourceforge">
+ </branch>
+ <dependencies>
+ <dep package="cppunit"/>
+ </dependencies>
+ </autotools>
+
+ <!-- Reading/Converting Visio files https://github.com/LibreOffice/libvisio -->
+ <autotools
+ id="libvisio"
+ autogen-sh="autoreconf">
+ <branch
+ module="LibreOffice/libvisio/archive/libvisio-0.1.7.tar.gz"
+ version="0.1.7"
+ hash="sha256:68b8a0b45e39b6ba154fe79169f2887cc19f6ee2b82f287b4b625c70294aff27"
+ repo="github"
+ checkoutdir="libvisio-0.1.7">
+ </branch>
+ <dependencies>
+ <dep package="boost"/>
+ <dep package="icu"/>
+ <dep package="librevenge"/>
+ <dep package="libxml2"/>
+ <dep package="zlib"/>
+ </dependencies>
+ </autotools>
+
+ <metamodule
+ id="meta-inkscape-dependencies">
+ <dependencies>
+ <dep package="bdwgc"/>
+ <dep package="doubleconversion"/>
+ <dep package="ghostscript"/>
+ <dep package="googletest"/>
+ <dep package="gspell"/>
+ <dep package="gsl"/>
+ <dep package="gspell"/>
+ <dep package="imagemagick"/>
+ <dep package="libcdr"/>
+ <dep package="libsoup"/>
+ <dep package="libvisio"/>
+ <dep package="libwebp"/>
+ <dep package="openjpeg"/>
+ <dep package="openmp"/>
+ <dep package="poppler"/>
+ <dep package="potrace"/>
+ </dependencies>
+ </metamodule>
+
+ <!-- OpenJPEG https://github.com/uclouvain/openjpeg -->
+ <cmake
+ id="openjpeg">
+ <branch
+ module="uclouvain/openjpeg/archive/v2.4.0.tar.gz"
+ version="2.4.0"
+ hash="sha256:8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d"
+ repo="github"
+ checkoutdir="openjpeg-2.4.0"
+ rename-tarball="openjpeg-2.4.0.tar.gz">
+ </branch>
+ <dependencies>
+ <dep package="lcms"/>
+ <dep package="libpng"/>
+ <dep package="libtiff"/>
+ </dependencies>
+ </cmake>
+
+ <!-- OpenMP https://github.com/llvm/llvm-project -->
+ <cmake
+ id="openmp">
+ <branch
+ module="llvm/llvm-project/releases/download/llvmorg-12.0.1/openmp-12.0.1.src.tar.xz"
+ version="12.0.1"
+ hash="sha256:60fe79440eaa9ebf583a6ea7f81501310388c02754dbe7dc210776014d06b091"
+ repo="github"
+ checkoutdir="openmp-12.0.1">
+ </branch>
+ </cmake>
+
+ <!-- Poppler https://poppler.freedesktop.org -->
+ <cmake
+ id="poppler"
+ cmakeargs="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_GOBJECT_INTROSPECTION=OFF">
+ <branch
+ module="poppler-21.06.1.tar.xz"
+ version="21.06.1"
+ hash="sha256:86b09e5a02de40081a3916ef8711c5128eaf4b1fc59d5f87d0ec66f04f595db4"
+ repo="poppler">
+ </branch>
+ <dependencies>
+ <dep package="cmake"/>
+ <dep package="glib"/>
+ <dep package="gtk+-3.0"/>
+ <dep package="gdk-pixbuf"/>
+ </dependencies>
+ </cmake>
+
+ <!-- Potrace http://potrace.sourceforge.net -->
+ <autotools
+ id="potrace"
+ autogen-sh="configure"
+ autogenargs="--with-libpotrace">
+ <branch
+ module="potrace/1.16/potrace-1.16.tar.gz"
+ version="1.16"
+ hash="sha256:be8248a17dedd6ccbaab2fcc45835bb0502d062e40fbded3bc56028ce5eb7acc"
+ repo="sourceforge">
+ </branch>
+ </autotools>
+
+ <!-- Rust https://www.rust-lang.org
+
+ Rust has a custom setup routine (rustup) which is wrapped into
+ a cmake file introduced by that patch below.
+ -->
+ <cmake
+ id="rust"
+ cmakeargs="-DVERSION=1.59.0"
+ supports-non-srcdir-builds="no"
+ use-ninja="no">
+ <branch
+ module="rust-lang/rustup/archive/1.24.3.tar.gz"
+ version="1.24.3"
+ hash="sha256:24a8cede4ccbbf45ab7b8de141d92f47d1881bb546b3b9180d5a51dc0622d0f6"
+ repo="github"
+ checkoutdir="rustup-1.24.3"
+ rename-tarball="rustup-1.24.3.tar.gz">
+ <patch
+ file="rust_cmake_install.patch"
+ strip="1"/>
+ </branch>
+ </cmake>
+
+</moduleset>
diff --git a/packaging/macos/modulesets/jhbuildrc b/packaging/macos/modulesets/jhbuildrc
new file mode 100644
index 0000000..1953c49
--- /dev/null
+++ b/packaging/macos/modulesets/jhbuildrc
@@ -0,0 +1,4 @@
+# The following code will be appended to jhbuildrc-custom.
+
+if _default_arch == "arm64":
+ module_extra_env["gsl"] = { "MACOSX_DEPLOYMENT_TARGET": "" }
diff --git a/packaging/macos/modulesets/moduleset.dtd b/packaging/macos/modulesets/moduleset.dtd
new file mode 120000
index 0000000..8620b76
--- /dev/null
+++ b/packaging/macos/modulesets/moduleset.dtd
@@ -0,0 +1 @@
+../jhb/etc/modulesets/jhb/moduleset.dtd \ No newline at end of file
diff --git a/packaging/macos/modulesets/moduleset.xsl b/packaging/macos/modulesets/moduleset.xsl
new file mode 120000
index 0000000..018df53
--- /dev/null
+++ b/packaging/macos/modulesets/moduleset.xsl
@@ -0,0 +1 @@
+../jhb/etc/modulesets/jhb/moduleset.xsl \ No newline at end of file
diff --git a/packaging/macos/modulesets/patches/Quartz-version-detection-for-macOS-12.patch b/packaging/macos/modulesets/patches/Quartz-version-detection-for-macOS-12.patch
new file mode 100644
index 0000000..69c7586
--- /dev/null
+++ b/packaging/macos/modulesets/patches/Quartz-version-detection-for-macOS-12.patch
@@ -0,0 +1,67 @@
+From a752e338381bc37dbe8d4c04ec23e4f6fd911b30 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Wed, 8 Sep 2021 18:01:50 -0700
+Subject: [PATCH] Update Quartz version detection for macOS 12.
+
+---
+ gdk/quartz/gdkglobals-quartz.c | 16 +++++++---------
+ gdk/quartz/gdkquartz.h | 3 ++-
+ 2 files changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/gdk/quartz/gdkglobals-quartz.c b/gdk/quartz/gdkglobals-quartz.c
+index 72aed1c92d..30649efe8a 100644
+--- a/gdk/quartz/gdkglobals-quartz.c
++++ b/gdk/quartz/gdkglobals-quartz.c
+@@ -29,28 +29,26 @@ GdkWindow *_gdk_root = NULL;
+ GdkOSXVersion
+ gdk_quartz_osx_version (void)
+ {
+- static gint32 minor = GDK_OSX_UNSUPPORTED;
++ static gint32 vkey = GDK_OSX_UNSUPPORTED;
+
+- if (minor == GDK_OSX_UNSUPPORTED)
++ if (vkey == GDK_OSX_UNSUPPORTED)
+ {
+ #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
+- OSErr err = Gestalt (gestaltSystemVersionMinor, (SInt32*)&minor);
++ OSErr err = Gestalt (gestaltSystemVersionMinor, (SInt32*)&vkey);
+
+ g_return_val_if_fail (err == noErr, GDK_OSX_UNSUPPORTED);
+ #else
+ NSOperatingSystemVersion version;
+
+ version = [[NSProcessInfo processInfo] operatingSystemVersion];
+- minor = version.minorVersion;
+- if (version.majorVersion == 11)
+- minor += 16;
++ vkey = version.majorVersion == 10 ? version.minorVersion : version.majorVersion + 5;
+ #endif
+ }
+
+- if (minor < GDK_OSX_MIN)
++ if (vkey < GDK_OSX_MIN)
+ return GDK_OSX_UNSUPPORTED;
+- else if (minor > GDK_OSX_CURRENT)
++ else if (vkey > GDK_OSX_CURRENT)
+ return GDK_OSX_NEW;
+ else
+- return minor;
++ return vkey;
+ }
+diff --git a/gdk/quartz/gdkquartz.h b/gdk/quartz/gdkquartz.h
+index dd1b4f41af..2d53dcbce6 100644
+--- a/gdk/quartz/gdkquartz.h
++++ b/gdk/quartz/gdkquartz.h
+@@ -42,7 +42,8 @@ typedef enum
+ GDK_OSX_MOJAVE = 14,
+ GDK_OSX_CATALINA = 15,
+ GDK_OSX_BIGSUR = 16,
+- GDK_OSX_CURRENT = 15,
++ GDK_OSX_MONTEREY = 17,
++ GDK_OSX_CURRENT = 17,
+ GDK_OSX_NEW = 99
+ } GdkOSXVersion;
+
+--
+2.30.1 (Apple Git-130)
+
diff --git a/packaging/macos/modulesets/patches/README.md b/packaging/macos/modulesets/patches/README.md
new file mode 100644
index 0000000..c0671a1
--- /dev/null
+++ b/packaging/macos/modulesets/patches/README.md
@@ -0,0 +1,3 @@
+# patches
+
+This is an offspring of [gtk-osx](https://gitlab.gnome.org/GNOME/gtk-osx)'s `patches` folder.
diff --git a/packaging/macos/modulesets/patches/cairo-color_mgmt_perf.patch b/packaging/macos/modulesets/patches/cairo-color_mgmt_perf.patch
new file mode 100644
index 0000000..a97dc64
--- /dev/null
+++ b/packaging/macos/modulesets/patches/cairo-color_mgmt_perf.patch
@@ -0,0 +1,472 @@
+https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/290
+From dbaab35b42c559ef3eb8ef0df6277246fd02a03f Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Sat, 26 Feb 2022 16:47:22 -0800
+Subject: [PATCH 1/3] Conditionally Use Main Display ColorSpace instead of
+ kCGColorSpaceDefaultRGB.
+
+The default RGB colorspace must be converted to the GPU's colorspace
+using CGColorTransformConvertUsingCMSConverter. Profiling has shown this
+function to consume as much as 48% of a redraw cycle in gdk-quartz.
+
+There seems to be no named colorspace that matches the one stored on the
+display, so we use the one associated with the main display. This has
+some risks for users with multiple monitors but in testing with my own
+two-monitor setup, one of which is HDR and the other not, the colorspace
+was the same for both.
+
+There's another issue: The monitor's color space is wrong for generating
+PNGs, producing somewhat faded colors and causing many tests to fail, so
+I've resorted to a bit of a hack: If
+cairo_quartz_surface_create_for_cg_context has been called then we're
+drawing for a screen and need to use its colorspace, otherwise we use
+kCGColorSpaceDefaultRGB as usual.
+
+Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/330
+---
+ src/cairo-mutex-list-private.h | 4 ++++
+ src/cairo-quartz-surface.c | 42 ++++++++++++++++++++++++++++++----
+ 2 files changed, 41 insertions(+), 5 deletions(-)
+
+diff --git a/src/cairo-mutex-list-private.h b/src/cairo-mutex-list-private.h
+index 70d566ebb..eef6a10a1 100644
+--- a/src/cairo-mutex-list-private.h
++++ b/src/cairo-mutex-list-private.h
+@@ -68,6 +68,10 @@ CAIRO_MUTEX_DECLARE (_cairo_xcb_connections_mutex)
+ CAIRO_MUTEX_DECLARE (_cairo_gl_context_mutex)
+ #endif
+
++#if CAIRO_HAS_QUARTZ_SURFACE
++CAIRO_MUTEX_DECLARE (_cairo_quartz_surface_draw_to_screen_mutex)
++#endif
++
+ #if !defined (HAS_ATOMIC_OPS) || defined (ATOMIC_OP_NEEDS_MEMORY_BARRIER)
+ CAIRO_MUTEX_DECLARE (_cairo_atomic_mutex)
+ #endif
+diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
+index 5681918c4..d32ada32a 100644
+--- a/src/cairo-quartz-surface.c
++++ b/src/cairo-quartz-surface.c
+@@ -64,6 +64,10 @@
+ #define ND(_x) do {} while(0)
+ #endif
+
++#if ! CAIRO_NO_MUTEX
++static bool _draw_to_screen = FALSE;
++#endif
++
+ #define IS_EMPTY(s) ((s)->extents.width == 0 || (s)->extents.height == 0)
+
+ /**
+@@ -166,6 +170,28 @@ static void quartz_ensure_symbols (void)
+ _cairo_quartz_symbol_lookup_done = TRUE;
+ }
+
++static CGColorSpaceRef
++_cairo_quartz_create_color_space (CGContextRef context)
++{
++ CGColorSpaceRef color_space = NULL;
++
++ if (context)
++ {
++ color_space = CGBitmapContextGetColorSpace (context);
++ return CGColorSpaceRetain (color_space);
++ }
++#if !CAIRO_NO_MUTEX
++ CAIRO_MUTEX_LOCK (_cairo_quartz_surface_draw_to_screen_mutex);
++ if (_draw_to_screen)
++ color_space = CGDisplayCopyColorSpace (CGMainDisplayID ());
++ CAIRO_MUTEX_UNLOCK (_cairo_quartz_surface_draw_to_screen_mutex);
++#endif
++ if (!color_space)
++ color_space = CGColorSpaceCreateDeviceRGB ();
++
++ return color_space;
++}
++
+ CGImageRef
+ CairoQuartzCreateCGImage (cairo_format_t format,
+ unsigned int width,
+@@ -186,7 +212,7 @@ CairoQuartzCreateCGImage (cairo_format_t format,
+ switch (format) {
+ case CAIRO_FORMAT_ARGB32:
+ if (colorSpace == NULL)
+- colorSpace = CGColorSpaceCreateDeviceRGB ();
++ colorSpace = _cairo_quartz_create_color_space (NULL);
+ bitinfo |= kCGImageAlphaPremultipliedFirst;
+ bitsPerComponent = 8;
+ bitsPerPixel = 32;
+@@ -194,7 +220,7 @@ CairoQuartzCreateCGImage (cairo_format_t format,
+
+ case CAIRO_FORMAT_RGB24:
+ if (colorSpace == NULL)
+- colorSpace = CGColorSpaceCreateDeviceRGB ();
++ colorSpace = _cairo_quartz_create_color_space (NULL);
+ bitinfo |= kCGImageAlphaNoneSkipFirst;
+ bitsPerComponent = 8;
+ bitsPerPixel = 32;
+@@ -788,6 +814,7 @@ CairoQuartzCreateGradientFunction (const cairo_gradient_pattern_t *gradient,
+ input_value_range,
+ 4,
+ gradient_output_value_ranges,
++
+ &gradient_callbacks);
+ }
+
+@@ -1234,7 +1261,7 @@ _cairo_quartz_setup_gradient_source (cairo_quartz_drawing_state_t *state,
+ if (unlikely (gradFunc == NULL))
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+
+- rgb = CGColorSpaceCreateDeviceRGB ();
++ rgb = _cairo_quartz_create_color_space (NULL);
+
+ if (gradient->base.type == CAIRO_PATTERN_TYPE_LINEAR) {
+ state->shading = CGShadingCreateAxial (rgb,
+@@ -1485,7 +1512,7 @@ _cairo_quartz_surface_map_to_image (void *abstract_surface,
+ bpp = CGBitmapContextGetBitsPerPixel (surface->cgContext);
+
+ // let's hope they don't add YUV under us
+- colorspace = CGBitmapContextGetColorSpace (surface->cgContext);
++ colorspace = _cairo_quartz_create_color_space (surface->cgContext);
+ color_comps = CGColorSpaceGetNumberOfComponents (colorspace);
+
+ /* XXX TODO: We can handle many more data formats by
+@@ -2398,6 +2425,11 @@ cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
+ {
+ cairo_quartz_surface_t *surf;
+
++#if !CAIRO_NO_MUTEX
++ CAIRO_MUTEX_LOCK (_cairo_quartz_surface_draw_to_screen_mutex);
++ _draw_to_screen = TRUE;
++ CAIRO_MUTEX_UNLOCK (_cairo_quartz_surface_draw_to_screen_mutex);
++#endif
+ surf = _cairo_quartz_surface_create_internal (cgContext, CAIRO_CONTENT_COLOR_ALPHA,
+ width, height);
+ if (likely (!surf->base.status))
+@@ -2445,7 +2477,7 @@ cairo_quartz_surface_create (cairo_format_t format,
+ if (format == CAIRO_FORMAT_ARGB32 ||
+ format == CAIRO_FORMAT_RGB24)
+ {
+- cgColorspace = CGColorSpaceCreateDeviceRGB ();
++ cgColorspace = _cairo_quartz_create_color_space (NULL);
+ bitinfo = kCGBitmapByteOrder32Host;
+ if (format == CAIRO_FORMAT_ARGB32)
+ bitinfo |= kCGImageAlphaPremultipliedFirst;
+--
+GitLab
+
+
+From 94a3792078de492920af2944b25a5e1b6722a8ac Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Sat, 26 Feb 2022 17:53:50 -0800
+Subject: [PATCH 2/3] [quartz] Use CGContextSetFooColorWithColor
+
+Replacing CGContextSetFooRGBColor because that re-sets the CGContext's
+color space to kCGColorSpaceDefaultRGB and we don't want that.
+---
+ src/cairo-quartz-surface.c | 53 ++++++++++++++++++++++++++++----------
+ 1 file changed, 40 insertions(+), 13 deletions(-)
+
+diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
+index d32ada32a..ec8cd9b75 100644
+--- a/src/cairo-quartz-surface.c
++++ b/src/cairo-quartz-surface.c
+@@ -192,6 +192,25 @@ _cairo_quartz_create_color_space (CGContextRef context)
+ return color_space;
+ }
+
++static CGColorRef
++_cairo_quartz_create_cgcolor (CGColorSpaceRef cs, CGFloat red, CGFloat green,
++ CGFloat blue, CGFloat alpha)
++{
++ CGFloat colors[4] = { red, green, blue, alpha };
++ CGColorRef cgc;
++ if (!cs)
++ cs = _cairo_quartz_create_color_space (NULL);
++ cgc = CGColorCreate (cs, colors);
++ CGColorSpaceRelease (cs);
++ return cgc;
++}
++
++static CGColorRef
++_cairo_quartz_black (CGColorSpaceRef cs)
++{
++ return _cairo_quartz_create_cgcolor (cs, 0.0, 0.0, 0.0, 1.0);
++}
++
+ CGImageRef
+ CairoQuartzCreateCGImage (cairo_format_t format,
+ unsigned int width,
+@@ -1128,6 +1147,7 @@ _cairo_quartz_setup_pattern_source (cairo_quartz_drawing_state_t *state,
+ CGColorSpaceRef patternSpace;
+ CGPatternRef cgpat = NULL;
+ cairo_int_status_t status;
++ CGColorRef black = _cairo_quartz_black (_cairo_quartz_create_color_space (state->cgDrawContext));
+
+ _cairo_surface_get_extents (&surface->base, &extents);
+
+@@ -1183,7 +1203,7 @@ _cairo_quartz_setup_pattern_source (cairo_quartz_drawing_state_t *state,
+ -state->clipRect.origin.y);
+ }
+
+- CGContextSetRGBFillColor (state->cgDrawContext, 0, 0, 0, 1);
++ CGContextSetFillColorWithColor (state->cgDrawContext, black);
+
+ state->rect = CGRectMake (0, 0, pattern_extents.width, pattern_extents.height);
+ state->action = DO_IMAGE;
+@@ -1222,6 +1242,7 @@ _cairo_quartz_setup_pattern_source (cairo_quartz_drawing_state_t *state,
+ CGContextSetPatternPhase (state->cgDrawContext, CGSizeMake (0, 0));
+
+ CGPatternRelease (cgpat);
++ CGColorRelease (black);
+
+ state->action = DO_DIRECT;
+ return CAIRO_STATUS_SUCCESS;
+@@ -1300,6 +1321,7 @@ _cairo_quartz_setup_state (cairo_quartz_drawing_state_t *state,
+ const cairo_clip_t *clip = composite->clip;
+ cairo_bool_t needs_temp;
+ cairo_status_t status;
++ CGColorRef black;
+
+ state->layer = NULL;
+ state->image = NULL;
+@@ -1332,9 +1354,11 @@ _cairo_quartz_setup_state (cairo_quartz_drawing_state_t *state,
+ state->filter = _cairo_quartz_filter_to_quartz (source->filter);
+
+ if (op == CAIRO_OPERATOR_CLEAR) {
+- CGContextSetRGBFillColor (state->cgDrawContext, 0, 0, 0, 1);
++ CGColorRef black = _cairo_quartz_black (_cairo_quartz_create_color_space (surface->cgContext));
++ CGContextSetFillColorWithColor (state->cgDrawContext, black);
+
+ state->action = DO_DIRECT;
++ CGColorRelease (black);
+ return CAIRO_STATUS_SUCCESS;
+ }
+
+@@ -1371,18 +1395,17 @@ _cairo_quartz_setup_state (cairo_quartz_drawing_state_t *state,
+
+ if (source->type == CAIRO_PATTERN_TYPE_SOLID) {
+ cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) source;
++ CGColorRef color = _cairo_quartz_create_cgcolor (_cairo_quartz_create_color_space (state->cgDrawContext),
++ solid->color.red,
++ solid->color.green,
++ solid->color.blue,
++ solid->color.alpha);
+
+- CGContextSetRGBStrokeColor (state->cgDrawContext,
+- solid->color.red,
+- solid->color.green,
+- solid->color.blue,
+- solid->color.alpha);
+- CGContextSetRGBFillColor (state->cgDrawContext,
+- solid->color.red,
+- solid->color.green,
+- solid->color.blue,
+- solid->color.alpha);
+
++ CGContextSetStrokeColorWithColor (state->cgDrawContext, color);
++ CGContextSetFillColorWithColor (state->cgDrawContext, color);
++
++ CGColorRelease (color);
+ state->action = DO_DIRECT;
+ return CAIRO_STATUS_SUCCESS;
+ }
+@@ -1436,6 +1459,9 @@ static inline void
+ _cairo_quartz_draw_cgcontext (cairo_quartz_drawing_state_t *state,
+ cairo_operator_t op)
+ {
++ CGColorSpaceRef cs = _cairo_quartz_create_color_space (state->cgDrawContext);
++ CGColorRef transparent = _cairo_quartz_create_cgcolor (cs, 0.0, 0.0, 0.0, 0.0);
++
+ if (! (op == CAIRO_OPERATOR_SOURCE &&
+ state->cgDrawContext == state->cgMaskContext))
+ return;
+@@ -1450,8 +1476,9 @@ _cairo_quartz_draw_cgcontext (cairo_quartz_drawing_state_t *state,
+
+ CGContextAddRect (state->cgDrawContext, state->clipRect);
+
+- CGContextSetRGBFillColor (state->cgDrawContext, 0, 0, 0, 0);
++ CGContextSetFillColorWithColor (state->cgDrawContext, transparent);
+ CGContextEOFillPath (state->cgDrawContext);
++ CGColorRelease (transparent);
+ }
+
+
+--
+GitLab
+
+
+From 79624a15d3c3bfcd089d2d833bd986a1177301f3 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Thu, 7 Apr 2022 10:58:02 -0700
+Subject: [PATCH 3/3] Use macOS png creation facilities for creating test PNGs
+
+---
+ boilerplate/cairo-boilerplate-quartz.c | 6 +--
+ src/cairo-quartz-private.h | 3 ++
+ src/cairo-quartz-surface.c | 52 ++++++--------------------
+ 3 files changed, 18 insertions(+), 43 deletions(-)
+
+diff --git a/boilerplate/cairo-boilerplate-quartz.c b/boilerplate/cairo-boilerplate-quartz.c
+index d4ca35383..1a1417c75 100644
+--- a/boilerplate/cairo-boilerplate-quartz.c
++++ b/boilerplate/cairo-boilerplate-quartz.c
+@@ -26,7 +26,7 @@
+
+ #include "cairo-boilerplate-private.h"
+
+-#include <cairo-quartz.h>
++#include <cairo-quartz-private.h>
+
+ static cairo_surface_t *
+ _cairo_boilerplate_quartz_create_surface (const char *name,
+@@ -56,7 +56,7 @@ static const cairo_boilerplate_target_t targets[] = {
+ cairo_surface_create_similar,
+ NULL, NULL,
+ _cairo_boilerplate_get_image_surface,
+- cairo_surface_write_to_png,
++ _cairo_quartz_surface_to_png,
+ NULL, NULL, NULL,
+ TRUE, FALSE, FALSE
+ },
+@@ -68,7 +68,7 @@ static const cairo_boilerplate_target_t targets[] = {
+ cairo_surface_create_similar,
+ NULL, NULL,
+ _cairo_boilerplate_get_image_surface,
+- cairo_surface_write_to_png,
++ _cairo_quartz_surface_to_png,
+ NULL, NULL, NULL,
+ FALSE, FALSE, FALSE
+ },
+diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
+index 609a9052c..08d9a33c1 100644
+--- a/src/cairo-quartz-private.h
++++ b/src/cairo-quartz-private.h
+@@ -106,6 +106,9 @@ CairoQuartzCreateCGImage (cairo_format_t format,
+ cairo_private CGFontRef
+ _cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont);
+
++cairo_status_t _cairo_quartz_surface_to_png (cairo_quartz_surface_t *nq, const char *dest);
++cairo_private void _cairo_quartz_image_to_png (CGImageRef, const char *dest);
++
+ #else
+
+ # error Cairo was not compiled with support for the quartz backend
+diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
+index ec8cd9b75..13f409339 100644
+--- a/src/cairo-quartz-surface.c
++++ b/src/cairo-quartz-surface.c
+@@ -64,10 +64,6 @@
+ #define ND(_x) do {} while(0)
+ #endif
+
+-#if ! CAIRO_NO_MUTEX
+-static bool _draw_to_screen = FALSE;
+-#endif
+-
+ #define IS_EMPTY(s) ((s)->extents.width == 0 || (s)->extents.height == 0)
+
+ /**
+@@ -126,15 +122,6 @@ static bool (*CGContextGetAllowsFontSmoothingPtr) (CGContextRef) = NULL;
+
+ static cairo_bool_t _cairo_quartz_symbol_lookup_done = FALSE;
+
+-/*
+- * Utility functions
+- */
+-
+-#ifdef QUARTZ_DEBUG
+-static void quartz_surface_to_png (cairo_quartz_surface_t *nq, const char *dest);
+-static void quartz_image_to_png (CGImageRef, const char *dest);
+-#endif
+-
+ typedef struct
+ {
+ cairo_surface_t base;
+@@ -180,12 +167,8 @@ _cairo_quartz_create_color_space (CGContextRef context)
+ color_space = CGBitmapContextGetColorSpace (context);
+ return CGColorSpaceRetain (color_space);
+ }
+-#if !CAIRO_NO_MUTEX
+- CAIRO_MUTEX_LOCK (_cairo_quartz_surface_draw_to_screen_mutex);
+- if (_draw_to_screen)
+- color_space = CGDisplayCopyColorSpace (CGMainDisplayID ());
+- CAIRO_MUTEX_UNLOCK (_cairo_quartz_surface_draw_to_screen_mutex);
+-#endif
++ color_space = CGDisplayCopyColorSpace (CGMainDisplayID ());
++
+ if (!color_space)
+ color_space = CGColorSpaceCreateDeviceRGB ();
+
+@@ -2450,15 +2433,9 @@ cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext,
+ unsigned int width,
+ unsigned int height)
+ {
+- cairo_quartz_surface_t *surf;
+-
+-#if !CAIRO_NO_MUTEX
+- CAIRO_MUTEX_LOCK (_cairo_quartz_surface_draw_to_screen_mutex);
+- _draw_to_screen = TRUE;
+- CAIRO_MUTEX_UNLOCK (_cairo_quartz_surface_draw_to_screen_mutex);
+-#endif
+- surf = _cairo_quartz_surface_create_internal (cgContext, CAIRO_CONTENT_COLOR_ALPHA,
+- width, height);
++ cairo_quartz_surface_t *surf =
++ _cairo_quartz_surface_create_internal (cgContext, CAIRO_CONTENT_COLOR_ALPHA,
++ width, height);
+ if (likely (!surf->base.status))
+ CGContextRetain (cgContext);
+
+@@ -2673,12 +2650,8 @@ _cairo_quartz_surface_snapshot_get_image (cairo_quartz_surface_t *surface)
+ return CGImageRetain (((cairo_quartz_snapshot_t*)snapshot)->image);
+ }
+
+-/* Debug stuff */
+-
+-#ifdef QUARTZ_DEBUG
+-
+ void
+-quartz_image_to_png (CGImageRef image, const char *dest)
++_cairo_quartz_image_to_png (CGImageRef image, const char *dest)
+ {
+ static int sctr = 0;
+ const char* image_name = "quartz-image";
+@@ -2691,7 +2664,7 @@ quartz_image_to_png (CGImageRef image, const char *dest)
+
+ memset (pathbuf, 0, sizeof (pathbuf));
+ dest = dest ? dest : image_name;
+- snprintf (pathbuf, sizeof (pathbuf), "%s/Desktop/%s%d.png",getenv ("HOME"), dest, sctr++, ext);
++ snprintf (pathbuf, sizeof (pathbuf), "%s/Desktop/%s%d.png",getenv ("HOME"), dest, sctr++);
+ path = CFStringCreateWithCString (NULL, pathbuf, kCFStringEncodingUTF8);
+ url = CFURLCreateWithFileSystemPath (NULL, path, kCFURLPOSIXPathStyle, FALSE);
+ image_dest = CGImageDestinationCreateWithURL (url, png_utti, 1, NULL);
+@@ -2703,21 +2676,20 @@ quartz_image_to_png (CGImageRef image, const char *dest)
+ CFRelease (path);
+ }
+
+-void
+-quartz_surface_to_png (cairo_quartz_surface_t *nq, const char *dest)
++cairo_status_t
++_cairo_quartz_surface_to_png (cairo_quartz_surface_t *nq, const char *dest)
+ {
+ static int sctr = 0;
+ CGImageRef image;
+
+ if (nq->base.type != CAIRO_SURFACE_TYPE_QUARTZ) {
+ fprintf (stderr, "** quartz_surface_to_png: surface %p isn't quartz!\n", nq);
+- return;
++ return CAIRO_STATUS_SURFACE_TYPE_MISMATCH;
+ }
+
+ image = CGBitmapContextCreateImage (nq->cgContext);
+- quartz_image_to_png (image, dest);
++ _cairo_quartz_image_to_png (image, dest);
+
+ CGImageRelease (image);
++ return CAIRO_STATUS_SUCCESS;
+ }
+-
+-#endif /* QUARTZ_DEBUG */
+--
+GitLab
+
diff --git a/packaging/macos/modulesets/patches/cairo-pixman_dithering.patch b/packaging/macos/modulesets/patches/cairo-pixman_dithering.patch
new file mode 100644
index 0000000..dc92e26
--- /dev/null
+++ b/packaging/macos/modulesets/patches/cairo-pixman_dithering.patch
@@ -0,0 +1,659 @@
+From e0d713b9bbd6d4a1e27e18c15141fa7f568001c7 Mon Sep 17 00:00:00 2001
+From: Marc Jeanmougin <marc@jeanmougin.fr>
+Date: Wed, 29 May 2019 09:44:09 +0200
+Subject: [PATCH 1/3] Enable access to the pixman dithering path Code to choose
+ between dithering quality is modeled on the filter rendering choice
+
+---
+ src/cairo-gl-gradient.c | 4 +++-
+ src/cairo-image-source.c | 48 +++++++++++++++++++++++++++++++++++++
+ src/cairo-pattern-private.h | 1 +
+ src/cairo-pattern.c | 45 ++++++++++++++++++++++++++++++++++
+ src/cairo.h | 14 +++++++++++
+ 5 files changed, 111 insertions(+), 1 deletion(-)
+
+diff --git a/src/cairo-gl-gradient.c b/src/cairo-gl-gradient.c
+index 293d4e30e..a22cca729 100644
+--- a/src/cairo-gl-gradient.c
++++ b/src/cairo-gl-gradient.c
+@@ -160,7 +160,9 @@ _cairo_gl_gradient_render (const cairo_gl_context_t *ctx,
+
+ pixman_image_set_filter (gradient, PIXMAN_FILTER_BILINEAR, NULL, 0);
+ pixman_image_set_repeat (gradient, PIXMAN_REPEAT_PAD);
+-
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++ pixman_image_set_dither (gradient, PIXMAN_DITHER_BEST);
++#endif
+ image = pixman_image_create_bits (gradient_pixman_format, width, 1,
+ bytes, sizeof(uint32_t)*width);
+ if (unlikely (image == NULL)) {
+diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c
+index c56845ab2..274f43df7 100644
+--- a/src/cairo-image-source.c
++++ b/src/cairo-image-source.c
+@@ -383,6 +383,30 @@ _pixman_image_for_gradient (const cairo_gradient_pattern_t *pattern,
+
+ pixman_image_set_repeat (pixman_image, pixman_repeat);
+ }
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++ {
++ pixman_dither_t pixman_dither;
++
++ switch (pattern->base.dither) {
++ default:
++ case CAIRO_DITHER_NONE:
++ case CAIRO_DITHER_DEFAULT:
++ pixman_dither = PIXMAN_DITHER_NONE;
++ break;
++ case CAIRO_DITHER_FAST:
++ pixman_dither = PIXMAN_DITHER_FAST;
++ break;
++ case CAIRO_DITHER_GOOD:
++ pixman_dither = PIXMAN_DITHER_GOOD;
++ break;
++ case CAIRO_DITHER_BEST:
++ pixman_dither = PIXMAN_DITHER_BEST;
++ break;
++ }
++
++ pixman_image_set_dither (pixman_image, pixman_dither);
++ }
++#endif
+
+ return pixman_image;
+ }
+@@ -1047,6 +1071,30 @@ _pixman_image_set_properties (pixman_image_t *pixman_image,
+
+ pixman_image_set_repeat (pixman_image, pixman_repeat);
+ }
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++ {
++ pixman_dither_t pixman_dither;
++
++ switch (pattern->dither) {
++ default:
++ case CAIRO_DITHER_NONE:
++ case CAIRO_DITHER_DEFAULT:
++ pixman_dither = PIXMAN_DITHER_NONE;
++ break;
++ case CAIRO_DITHER_FAST:
++ pixman_dither = PIXMAN_DITHER_FAST;
++ break;
++ case CAIRO_DITHER_GOOD:
++ pixman_dither = PIXMAN_DITHER_GOOD;
++ break;
++ case CAIRO_DITHER_BEST:
++ pixman_dither = PIXMAN_DITHER_BEST;
++ break;
++ }
++
++ pixman_image_set_dither (pixman_image, pixman_dither);
++ }
++#endif
+
+ if (pattern->has_component_alpha)
+ pixman_image_set_component_alpha (pixman_image, TRUE);
+diff --git a/src/cairo-pattern-private.h b/src/cairo-pattern-private.h
+index f6138fb70..96ae4f615 100644
+--- a/src/cairo-pattern-private.h
++++ b/src/cairo-pattern-private.h
+@@ -70,6 +70,7 @@ struct _cairo_pattern {
+ cairo_pattern_type_t type;
+
+ cairo_filter_t filter;
++ cairo_dither_t dither;
+ cairo_extend_t extend;
+ cairo_bool_t has_component_alpha;
+ cairo_bool_t is_userfont_foreground;
+diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
+index 6bd3edfd8..6cf907f36 100644
+--- a/src/cairo-pattern.c
++++ b/src/cairo-pattern.c
+@@ -74,6 +74,7 @@ static const cairo_solid_pattern_t _cairo_pattern_nil = {
+
+ CAIRO_PATTERN_TYPE_SOLID, /* type */
+ CAIRO_FILTER_DEFAULT, /* filter */
++ CAIRO_DITHER_DEFAULT, /* dither */
+ CAIRO_EXTEND_GRADIENT_DEFAULT, /* extend */
+ FALSE, /* has component alpha */
+ FALSE, /* is_userfont_foreground */
+@@ -91,6 +92,7 @@ static const cairo_solid_pattern_t _cairo_pattern_nil_null_pointer = {
+
+ CAIRO_PATTERN_TYPE_SOLID, /* type */
+ CAIRO_FILTER_DEFAULT, /* filter */
++ CAIRO_DITHER_DEFAULT, /* dither */
+ CAIRO_EXTEND_GRADIENT_DEFAULT, /* extend */
+ FALSE, /* has component alpha */
+ FALSE, /* is_userfont_foreground */
+@@ -108,6 +110,7 @@ const cairo_solid_pattern_t _cairo_pattern_black = {
+
+ CAIRO_PATTERN_TYPE_SOLID, /* type */
+ CAIRO_FILTER_NEAREST, /* filter */
++ CAIRO_DITHER_DEFAULT, /* dither */
+ CAIRO_EXTEND_REPEAT, /* extend */
+ FALSE, /* has component alpha */
+ FALSE, /* is_userfont_foreground */
+@@ -126,6 +129,7 @@ const cairo_solid_pattern_t _cairo_pattern_clear = {
+
+ CAIRO_PATTERN_TYPE_SOLID, /* type */
+ CAIRO_FILTER_NEAREST, /* filter */
++ CAIRO_DITHER_DEFAULT, /* dither */
+ CAIRO_EXTEND_REPEAT, /* extend */
+ FALSE, /* has component alpha */
+ FALSE, /* is_userfont_foreground */
+@@ -144,6 +148,7 @@ const cairo_solid_pattern_t _cairo_pattern_white = {
+
+ CAIRO_PATTERN_TYPE_SOLID, /* type */
+ CAIRO_FILTER_NEAREST, /* filter */
++ CAIRO_DITHER_DEFAULT, /* dither */
+ CAIRO_EXTEND_REPEAT, /* extend */
+ FALSE, /* has component alpha */
+ FALSE, /* is_userfont_foreground */
+@@ -235,6 +240,7 @@ _cairo_pattern_init (cairo_pattern_t *pattern, cairo_pattern_type_t type)
+ pattern->extend = CAIRO_EXTEND_GRADIENT_DEFAULT;
+
+ pattern->filter = CAIRO_FILTER_DEFAULT;
++ pattern->dither = CAIRO_DITHER_DEFAULT;
+ pattern->opacity = 1.0;
+
+ pattern->has_component_alpha = FALSE;
+@@ -2074,6 +2080,28 @@ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter)
+ _cairo_pattern_notify_observers (pattern, CAIRO_PATTERN_NOTIFY_FILTER);
+ }
+
++/**
++ * cairo_pattern_set_dither:
++ * @pattern: a #cairo_pattern_t
++ * @filter: a #cairo_dither_t describing the dithering to use
++ *
++ * See #cairo_dither_t for details on each algorithm.
++ *
++ * Since: TODO
++ **/
++void
++cairo_pattern_set_dither (cairo_pattern_t *pattern, cairo_dither_t dither)
++{
++ if (pattern->status)
++ return;
++
++ pattern->dither = dither;
++ _cairo_pattern_notify_observers (pattern, CAIRO_PATTERN_NOTIFY_FILTER);
++ /* We probably can notify the same observers as when we notify filter
++ * changes (?) TODO CHECK THAT */
++}
++
++
+ /**
+ * cairo_pattern_get_filter:
+ * @pattern: a #cairo_pattern_t
+@@ -2091,6 +2119,23 @@ cairo_pattern_get_filter (cairo_pattern_t *pattern)
+ return pattern->filter;
+ }
+
++/**
++ * cairo_pattern_get_dither:
++ * @pattern: a #cairo_pattern_t
++ *
++ * Gets the current dithering for a pattern. See #cairo_dither_t
++ * for details.
++ *
++ * Return value: the current dithering algorithm of the pattern
++ *
++ * Since: TODO
++ **/
++cairo_dither_t
++cairo_pattern_get_dither (cairo_pattern_t *pattern)
++{
++ return pattern->dither;
++}
++
+ /**
+ * cairo_pattern_set_extend:
+ * @pattern: a #cairo_pattern_t
+diff --git a/src/cairo.h b/src/cairo.h
+index fb1da4146..1c911d09d 100644
+--- a/src/cairo.h
++++ b/src/cairo.h
+@@ -3003,12 +3003,26 @@ typedef enum _cairo_filter {
+ CAIRO_FILTER_GAUSSIAN
+ } cairo_filter_t;
+
++typedef enum _cairo_dither {
++ CAIRO_DITHER_NONE,
++ CAIRO_DITHER_DEFAULT,
++ CAIRO_DITHER_FAST,
++ CAIRO_DITHER_GOOD,
++ CAIRO_DITHER_BEST
++} cairo_dither_t;
++
+ cairo_public void
+ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
+
+ cairo_public cairo_filter_t
+ cairo_pattern_get_filter (cairo_pattern_t *pattern);
+
++cairo_public void
++cairo_pattern_set_dither (cairo_pattern_t *pattern, cairo_dither_t dither);
++
++cairo_public cairo_dither_t
++cairo_pattern_get_dither (cairo_pattern_t *pattern);
++
+ cairo_public cairo_status_t
+ cairo_pattern_get_rgba (cairo_pattern_t *pattern,
+ double *red, double *green,
+--
+2.25.1
+
+
+From 659173b4bb01e2de438d894dca9ed01838eaf028 Mon Sep 17 00:00:00 2001
+From: Marc Jeanmougin <marc@jeanmougin.fr>
+Date: Sat, 27 Mar 2021 23:53:28 +0100
+Subject: [PATCH 2/3] Expose dithering property at the image surface level.
+
+Copies the property on push_group
+---
+ src/cairo-default-context.c | 6 ++-
+ src/cairo-image-source.c | 40 ++----------------
+ src/cairo-image-surface-private.h | 1 +
+ src/cairo-image-surface.c | 67 +++++++++++++++++++++++++++++++
+ src/cairo.h | 22 ++++++----
+ src/cairoint.h | 5 +++
+ 6 files changed, 96 insertions(+), 45 deletions(-)
+
+diff --git a/src/cairo-default-context.c b/src/cairo-default-context.c
+index 567c5d4d5..24af125da 100644
+--- a/src/cairo-default-context.c
++++ b/src/cairo-default-context.c
+@@ -180,7 +180,11 @@ _cairo_default_context_push_group (void *abstract_cr, cairo_content_t content)
+ if (unlikely (status))
+ goto bail;
+
+- /* Set device offsets on the new surface so that logically it appears at
++ /* copies over the dither property */
++ cairo_image_surface_set_dither(group_surface,
++ cairo_image_surface_get_dither(parent_surface));
++
++ /* Set device offsets on the new surface so that logically it appears at
+ * the same location on the parent surface -- when we pop_group this,
+ * the source pattern will get fixed up for the appropriate target surface
+ * device offsets, so we want to set our own surface offsets from /that/,
+diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c
+index 274f43df7..93daff3c0 100644
+--- a/src/cairo-image-source.c
++++ b/src/cairo-image-source.c
+@@ -385,24 +385,8 @@ _pixman_image_for_gradient (const cairo_gradient_pattern_t *pattern,
+ }
+ #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
+ {
+- pixman_dither_t pixman_dither;
+-
+- switch (pattern->base.dither) {
+- default:
+- case CAIRO_DITHER_NONE:
+- case CAIRO_DITHER_DEFAULT:
+- pixman_dither = PIXMAN_DITHER_NONE;
+- break;
+- case CAIRO_DITHER_FAST:
+- pixman_dither = PIXMAN_DITHER_FAST;
+- break;
+- case CAIRO_DITHER_GOOD:
+- pixman_dither = PIXMAN_DITHER_GOOD;
+- break;
+- case CAIRO_DITHER_BEST:
+- pixman_dither = PIXMAN_DITHER_BEST;
+- break;
+- }
++ pixman_dither_t pixman_dither =
++ _pixman_dither_from_cairo_dither(pattern->base.dither);
+
+ pixman_image_set_dither (pixman_image, pixman_dither);
+ }
+@@ -1073,24 +1057,8 @@ _pixman_image_set_properties (pixman_image_t *pixman_image,
+ }
+ #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
+ {
+- pixman_dither_t pixman_dither;
+-
+- switch (pattern->dither) {
+- default:
+- case CAIRO_DITHER_NONE:
+- case CAIRO_DITHER_DEFAULT:
+- pixman_dither = PIXMAN_DITHER_NONE;
+- break;
+- case CAIRO_DITHER_FAST:
+- pixman_dither = PIXMAN_DITHER_FAST;
+- break;
+- case CAIRO_DITHER_GOOD:
+- pixman_dither = PIXMAN_DITHER_GOOD;
+- break;
+- case CAIRO_DITHER_BEST:
+- pixman_dither = PIXMAN_DITHER_BEST;
+- break;
+- }
++ pixman_dither_t pixman_dither =
++ _pixman_dither_from_cairo_dither (pattern->dither);
+
+ pixman_image_set_dither (pixman_image, pixman_dither);
+ }
+diff --git a/src/cairo-image-surface-private.h b/src/cairo-image-surface-private.h
+index 2b7921133..c06b9737b 100644
+--- a/src/cairo-image-surface-private.h
++++ b/src/cairo-image-surface-private.h
+@@ -78,6 +78,7 @@ struct _cairo_image_surface {
+ unsigned owns_data : 1;
+ unsigned transparency : 2;
+ unsigned color : 2;
++ cairo_dither_t dither : 3;
+ };
+ #define to_image_surface(S) ((cairo_image_surface_t *)(S))
+
+diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
+index 3b11eb981..977bb48e6 100644
+--- a/src/cairo-image-surface.c
++++ b/src/cairo-image-surface.c
+@@ -169,6 +169,7 @@ _cairo_image_surface_init (cairo_image_surface_t *surface,
+ surface->owns_data = FALSE;
+ surface->transparency = CAIRO_IMAGE_UNKNOWN;
+ surface->color = CAIRO_IMAGE_UNKNOWN_COLOR;
++ surface->dither = CAIRO_DITHER_DEFAULT;
+
+ surface->width = pixman_image_get_width (pixman_image);
+ surface->height = pixman_image_get_height (pixman_image);
+@@ -248,6 +249,25 @@ _pixman_format_from_masks (cairo_format_masks_t *masks,
+ return TRUE;
+ }
+
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++/* Convenience function to convert cairo_dither_t into pixman_dither_t */
++pixman_dither_t _pixman_dither_from_cairo_dither(cairo_dither_t dither)
++{
++ switch(dither) {
++ default:
++ case CAIRO_DITHER_NONE:
++ case CAIRO_DITHER_DEFAULT:
++ return PIXMAN_DITHER_NONE;
++ case CAIRO_DITHER_FAST:
++ return PIXMAN_DITHER_FAST;
++ case CAIRO_DITHER_GOOD:
++ return PIXMAN_DITHER_GOOD;
++ case CAIRO_DITHER_BEST:
++ return PIXMAN_DITHER_BEST;
++ }
++}
++#endif
++
+ /* A mask consisting of N bits set to 1. */
+ #define MASK(N) ((1UL << (N))-1)
+
+@@ -631,6 +651,30 @@ cairo_image_surface_get_width (cairo_surface_t *surface)
+ }
+ slim_hidden_def (cairo_image_surface_get_width);
+
++/**
++ * cairo_image_surface_get_dither:
++ * @surface: a #cairo_image_surface_t
++ *
++ * Get the current dithering method
++ *
++ * Return value: the current dithering method.
++ *
++ * Since: TODO
++ **/
++cairo_dither_t
++cairo_image_surface_get_dither (cairo_surface_t *surface)
++{
++ cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
++
++ if (! _cairo_surface_is_image (surface)) {
++ _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
++ return CAIRO_DITHER_DEFAULT;
++ }
++
++ return image_surface->dither;
++}
++//slim_hidden_def (cairo_image_surface_get_dither);
++
+ /**
+ * cairo_image_surface_get_height:
+ * @surface: a #cairo_image_surface_t
+@@ -792,6 +836,7 @@ _cairo_image_surface_snapshot (void *abstract_surface)
+
+ clone->transparency = image->transparency;
+ clone->color = image->color;
++ clone->dither = image->dither;
+
+ clone->owns_data = TRUE;
+ return &clone->base;
+@@ -1361,3 +1406,25 @@ error:
+ cairo_surface_destroy (image);
+ return to_image_surface (_cairo_surface_create_in_error (status));
+ }
++
++cairo_public int
++cairo_image_surface_set_dither (cairo_surface_t *surface, cairo_dither_t dither)
++{
++ cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
++
++ if (! _cairo_surface_is_image (surface)) {
++ _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
++ return 0;
++ }
++
++ image_surface->dither = dither;
++ if (image_surface->pixman_image) {
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++ pixman_image_set_dither(image_surface->pixman_image,
++ _pixman_dither_from_cairo_dither(dither));
++#endif
++ }
++
++}
++//slim_hidden_def (cairo_image_surface_set_dither);
++
+diff --git a/src/cairo.h b/src/cairo.h
+index 1c911d09d..76db87d2e 100644
+--- a/src/cairo.h
++++ b/src/cairo.h
+@@ -427,6 +427,14 @@ typedef enum _cairo_format {
+ CAIRO_FORMAT_RGBA128F = 7
+ } cairo_format_t;
+
++typedef enum _cairo_dither {
++ CAIRO_DITHER_NONE,
++ CAIRO_DITHER_DEFAULT,
++ CAIRO_DITHER_FAST,
++ CAIRO_DITHER_GOOD,
++ CAIRO_DITHER_BEST
++} cairo_dither_t;
++
+
+ /**
+ * cairo_write_func_t:
+@@ -2607,6 +2615,12 @@ cairo_image_surface_create_for_data (unsigned char *data,
+ cairo_public unsigned char *
+ cairo_image_surface_get_data (cairo_surface_t *surface);
+
++cairo_public cairo_dither_t
++cairo_image_surface_get_dither (cairo_surface_t *surface);
++
++cairo_public int
++cairo_image_surface_set_dither (cairo_surface_t *surface, cairo_dither_t dither);
++
+ cairo_public cairo_format_t
+ cairo_image_surface_get_format (cairo_surface_t *surface);
+
+@@ -3003,14 +3017,6 @@ typedef enum _cairo_filter {
+ CAIRO_FILTER_GAUSSIAN
+ } cairo_filter_t;
+
+-typedef enum _cairo_dither {
+- CAIRO_DITHER_NONE,
+- CAIRO_DITHER_DEFAULT,
+- CAIRO_DITHER_FAST,
+- CAIRO_DITHER_GOOD,
+- CAIRO_DITHER_BEST
+-} cairo_dither_t;
+-
+ cairo_public void
+ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
+
+diff --git a/src/cairoint.h b/src/cairoint.h
+index 80b695feb..a8442b5fe 100644
+--- a/src/cairoint.h
++++ b/src/cairoint.h
+@@ -1592,6 +1592,11 @@ cairo_private cairo_bool_t
+ _pixman_format_to_masks (pixman_format_code_t pixman_format,
+ cairo_format_masks_t *masks);
+
++#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
++cairo_private pixman_dither_t
++_pixman_dither_from_cairo_dither(cairo_dither_t dither);
++#endif
++
+ cairo_private void
+ _cairo_image_scaled_glyph_fini (cairo_scaled_font_t *scaled_font,
+ cairo_scaled_glyph_t *scaled_glyph);
+--
+2.25.1
+
+
+From edf60824e871d2393136303761135bb49986fa33 Mon Sep 17 00:00:00 2001
+From: Marc Jeanmougin <marc@jeanmougin.fr>
+Date: Mon, 29 Mar 2021 12:18:56 +0200
+Subject: [PATCH 3/3] make lint tests pass
+
+---
+ src/cairo-image-surface.c | 20 +++++++++++++++-----
+ src/cairo-pattern.c | 4 ++--
+ src/cairoint.h | 4 +++-
+ 3 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
+index 977bb48e6..d2f544a68 100644
+--- a/src/cairo-image-surface.c
++++ b/src/cairo-image-surface.c
+@@ -250,8 +250,9 @@ _pixman_format_from_masks (cairo_format_masks_t *masks,
+ }
+
+ #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
+-/* Convenience function to convert cairo_dither_t into pixman_dither_t */
+-pixman_dither_t _pixman_dither_from_cairo_dither(cairo_dither_t dither)
++/* Convenience function to convert #cairo_dither_t into #pixman_dither_t */
++pixman_dither_t
++_pixman_dither_from_cairo_dither (cairo_dither_t dither)
+ {
+ switch(dither) {
+ default:
+@@ -659,7 +660,7 @@ slim_hidden_def (cairo_image_surface_get_width);
+ *
+ * Return value: the current dithering method.
+ *
+- * Since: TODO
++ * Since: 1.18
+ **/
+ cairo_dither_t
+ cairo_image_surface_get_dither (cairo_surface_t *surface)
+@@ -673,7 +674,7 @@ cairo_image_surface_get_dither (cairo_surface_t *surface)
+
+ return image_surface->dither;
+ }
+-//slim_hidden_def (cairo_image_surface_get_dither);
++slim_hidden_def (cairo_image_surface_get_dither);
+
+ /**
+ * cairo_image_surface_get_height:
+@@ -1407,6 +1408,15 @@ error:
+ return to_image_surface (_cairo_surface_create_in_error (status));
+ }
+
++/**
++ * cairo_image_surface_set_dither:
++ * @surface: a #cairo_image_surface_t
++ * @dither: a #cairo_dither_t
++ *
++ * Sets the current dithering method
++ *
++ * Since: 1.18
++ **/
+ cairo_public int
+ cairo_image_surface_set_dither (cairo_surface_t *surface, cairo_dither_t dither)
+ {
+@@ -1426,5 +1436,5 @@ cairo_image_surface_set_dither (cairo_surface_t *surface, cairo_dither_t dither)
+ }
+
+ }
+-//slim_hidden_def (cairo_image_surface_set_dither);
++slim_hidden_def (cairo_image_surface_set_dither);
+
+diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
+index 6cf907f36..7d05b06a1 100644
+--- a/src/cairo-pattern.c
++++ b/src/cairo-pattern.c
+@@ -2087,7 +2087,7 @@ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter)
+ *
+ * See #cairo_dither_t for details on each algorithm.
+ *
+- * Since: TODO
++ * Since: 1.18
+ **/
+ void
+ cairo_pattern_set_dither (cairo_pattern_t *pattern, cairo_dither_t dither)
+@@ -2128,7 +2128,7 @@ cairo_pattern_get_filter (cairo_pattern_t *pattern)
+ *
+ * Return value: the current dithering algorithm of the pattern
+ *
+- * Since: TODO
++ * Since: 1.18
+ **/
+ cairo_dither_t
+ cairo_pattern_get_dither (cairo_pattern_t *pattern)
+diff --git a/src/cairoint.h b/src/cairoint.h
+index a8442b5fe..274d43556 100644
+--- a/src/cairoint.h
++++ b/src/cairoint.h
+@@ -1594,7 +1594,7 @@ _pixman_format_to_masks (pixman_format_code_t pixman_format,
+
+ #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,39,0)
+ cairo_private pixman_dither_t
+-_pixman_dither_from_cairo_dither(cairo_dither_t dither);
++_pixman_dither_from_cairo_dither (cairo_dither_t dither);
+ #endif
+
+ cairo_private void
+@@ -1982,6 +1982,8 @@ slim_hidden_proto (cairo_image_surface_get_format);
+ slim_hidden_proto (cairo_image_surface_get_height);
+ slim_hidden_proto (cairo_image_surface_get_stride);
+ slim_hidden_proto (cairo_image_surface_get_width);
++slim_hidden_proto (cairo_image_surface_get_dither);
++slim_hidden_proto (cairo_image_surface_set_dither);
+ slim_hidden_proto (cairo_line_to);
+ slim_hidden_proto (cairo_mask);
+ slim_hidden_proto (cairo_matrix_init);
+--
+2.25.1
+
+
+From b2e0f1d6f69ad3013dfb8d677f7b3ee9fac0fceb Mon Sep 17 00:00:00 2001
+From: Marc Jeanmougin <marc@jeanmougin.fr>
+Date: Mon, 24 Jan 2022 21:28:44 +0100
+Subject: [PATCH] add define to detect patched cairo
+
+---
+ src/cairo.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/cairo.h b/src/cairo.h
+index 76db87d2e..934bf65d0 100644
+--- a/src/cairo.h
++++ b/src/cairo.h
+@@ -2615,6 +2615,7 @@ cairo_image_surface_create_for_data (unsigned char *data,
+ cairo_public unsigned char *
+ cairo_image_surface_get_data (cairo_surface_t *surface);
+
++#define CAIRO_HAS_DITHER
+ cairo_public cairo_dither_t
+ cairo_image_surface_get_dither (cairo_surface_t *surface);
+
+--
+2.25.1
+
diff --git a/packaging/macos/modulesets/patches/cairo-snapshot_leak.patch b/packaging/macos/modulesets/patches/cairo-snapshot_leak.patch
new file mode 100644
index 0000000..5780735
--- /dev/null
+++ b/packaging/macos/modulesets/patches/cairo-snapshot_leak.patch
@@ -0,0 +1,27 @@
+https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/316
+From 243938c61a08dac8911153352e55933e0618581e Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Sat, 23 Apr 2022 16:38:01 -0700
+Subject: [PATCH] [quartz] Destroy local copy of snapshot after attaching it.
+
+Because cairo_surface_snapshot_attach refs the snapshot.
+
+Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/562
+---
+ src/cairo-quartz-surface.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
+index 5681918c4..fa6d9b1c9 100644
+--- a/src/cairo-quartz-surface.c
++++ b/src/cairo-quartz-surface.c
+@@ -2609,6 +2609,7 @@ _cairo_quartz_surface_snapshot_get_image (cairo_quartz_surface_t *surface)
+ if (unlikely (!snapshot || cairo_surface_status (snapshot)))
+ return NULL;
+ _cairo_surface_attach_snapshot (&surface->base, snapshot, NULL);
++ cairo_surface_destroy (snapshot);
+ }
+
+ return CGImageRetain (((cairo_quartz_snapshot_t*)snapshot)->image);
+--
+GitLab
diff --git a/packaging/macos/modulesets/patches/enchant-relocatable.patch b/packaging/macos/modulesets/patches/enchant-relocatable.patch
new file mode 100644
index 0000000..602b5c1
--- /dev/null
+++ b/packaging/macos/modulesets/patches/enchant-relocatable.patch
@@ -0,0 +1,38 @@
+diff --git a/src/lib.c b/src/lib.c
+index d9d3c54..ae3642f 100644
+--- a/src/lib.c
++++ b/src/lib.c
+@@ -130,6 +130,10 @@ enchant_get_conf_dirs (void)
+ char *pkgconfdir = NULL;
+ char *user_config_dir = NULL;
+
++ const char *prefix = g_getenv("ENCHANT_PREFIX");
++ if (prefix)
++ conf_dirs = g_slist_append(conf_dirs, g_build_filename(prefix, "/share/enchant", NULL));
++
+ if ((pkgdatadir = enchant_relocate (PKGDATADIR)) == NULL)
+ goto error_exit;
+ conf_dirs = g_slist_append (conf_dirs, pkgdatadir);
+@@ -148,6 +152,7 @@ enchant_get_conf_dirs (void)
+ return conf_dirs;
+
+ error_exit:
++ g_warning("error_exit in enchant_get_conf_dirs");
+ free (pkgdatadir);
+ free (sysconfdir);
+ g_free (pkgconfdir);
+@@ -878,7 +883,13 @@ enchant_load_providers_in_dir (EnchantBroker * broker, const char *dir_name)
+ static void
+ enchant_load_providers (EnchantBroker * broker)
+ {
+- char *module_dir = enchant_relocate (PKGLIBDIR "-" ENCHANT_MAJOR_VERSION);
++ const char *prefix = g_getenv("ENCHANT_PREFIX");
++ char *module_dir = NULL;
++ if (prefix)
++ module_dir = g_build_filename(prefix, "/lib/enchant-2", NULL);
++ else
++ module_dir = enchant_relocate (PKGLIBDIR "-" ENCHANT_MAJOR_VERSION);
++
+ if (module_dir)
+ enchant_load_providers_in_dir (broker, module_dir);
+ free (module_dir);
diff --git a/packaging/macos/modulesets/patches/frodo-getopt-autotools.patch b/packaging/macos/modulesets/patches/frodo-getopt-autotools.patch
new file mode 100644
index 0000000..dd374a2
--- /dev/null
+++ b/packaging/macos/modulesets/patches/frodo-getopt-autotools.patch
@@ -0,0 +1,28 @@
+--- a/Makefile 2014-11-24 04:33:39.000000000 -0800
++++ b/Makefile 2021-04-09 15:26:46.000000000 -0700
+@@ -1,7 +1,7 @@
+ .SUFFIXES:
+
+ DESTDIR=
+-prefix=/usr/local
++prefix=${PREFIX}
+ bindir=$(prefix)/bin
+ mandir=$(prefix)/man
+ man1dir=$(mandir)/man1
+@@ -43,7 +43,7 @@
+ -Wnested-externs -Winline
+ OPTIMIZE=-O3 -fno-strength-reduce
+ CFLAGS=$(WARNINGS) $(OPTIMIZE)
+-LDFLAGS=
++LDFLAGS=-L ${PREFIX}/lib -lintl
+
+ sources=getopt.c
+ ifeq ($(LIBCGETOPT),0)
+
+Diff finished. Fri Apr 9 15:28:12 2021
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e69de29..b53cf7a 100644
+--- a/configure
++++ b/configure
+@@ -0,0 +1,1 @@
++ #Do Nothing
diff --git a/packaging/macos/modulesets/patches/gdk-pixbuf-loader-name.patch b/packaging/macos/modulesets/patches/gdk-pixbuf-loader-name.patch
new file mode 100644
index 0000000..db499ba
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gdk-pixbuf-loader-name.patch
@@ -0,0 +1,25 @@
+diff -c /Users/john/Development/gtk-build/gtk-stable-10.9-x86_64/src/gdk-pixbuf-2.38.0/gdk-pixbuf/meson.build\~ /Users/john/Development/gtk-build/gtk-stable-10.9-x86_64/src/gdk-pixbuf-2.38.0/gdk-pixbuf/meson.build
+--- a/gdk-pixbuf/meson.build Mon Sep 3 07:41:50 2018
++++ b/gdk-pixbuf/meson.build Wed Jul 31 16:04:12 2019
+@@ -246,7 +246,8 @@
+ include_directories: [ root_inc, gdk_pixbuf_inc ],
+ c_args: common_cflags + gdk_pixbuf_cflags + cflags,
+ install: true,
+- install_dir: gdk_pixbuf_loaderdir)
++ install_dir: gdk_pixbuf_loaderdir,
++ name_suffix: 'so')
+
+ # We need the path to build loaders.cache for tests
+ dynamic_loaders += mod.full_path()
+@@ -265,7 +266,8 @@
+ include_directories: [ root_inc, gdk_pixbuf_inc ],
+ c_args: common_cflags + gdk_pixbuf_cflags + cflags,
+ install: true,
+- install_dir: gdk_pixbuf_loaderdir)
++ install_dir: gdk_pixbuf_loaderdir,
++ name_suffix: 'so')
+ dynamic_loaders += mod.full_path()
+ endforeach
+ endif
+
+Diff finished. Wed Jul 31 16:09:09 2019
diff --git a/packaging/macos/modulesets/patches/ghostscript_configure_libtiff.patch b/packaging/macos/modulesets/patches/ghostscript_configure_libtiff.patch
new file mode 100644
index 0000000..e53115e
--- /dev/null
+++ b/packaging/macos/modulesets/patches/ghostscript_configure_libtiff.patch
@@ -0,0 +1,11 @@
+--- a/configure 2022-04-04 15:48:49.000000000 +0200
++++ b/configure 2022-07-06 01:03:53.000000000 +0200
+@@ -8796,7 +8796,7 @@
+ if ! test -d "$LIBTIFFCONFDIR" ; then
+ mkdir "$LIBTIFFCONFDIR"
+ fi
+- cd "$LIBTIFFCONFDIR" && "$absolute_source_path/$LIBTIFFDIR/configure" $GS_TIFF_CONFIGURE_OPTS --disable-jbig --disable-lzma --disable-zstd --disable-webp --disable-libdeflate $SUBCONFIG_OPTS
++ cd "$LIBTIFFCONFDIR" && "$LIBTIFFDIR/configure" $GS_TIFF_CONFIGURE_OPTS --disable-jbig --disable-lzma --disable-zstd --disable-webp --disable-libdeflate $SUBCONFIG_OPTS
+ status=$?
+ if test $status -ne 0 ; then
+ as_fn_error $status "libtiff configure script failed" "$LINENO" 5
diff --git a/packaging/macos/modulesets/patches/ghostscript_link_cupsimage.patch b/packaging/macos/modulesets/patches/ghostscript_link_cupsimage.patch
new file mode 100644
index 0000000..81bc20a
--- /dev/null
+++ b/packaging/macos/modulesets/patches/ghostscript_link_cupsimage.patch
@@ -0,0 +1,11 @@
+--- a/base/unixlink.mak 2020-03-19 09:21:42.000000000 +0100
++++ b/base/unixlink.mak 2020-05-02 01:11:38.000000000 +0200
+@@ -168,7 +168,7 @@
+ $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(GS_LDFLAGS) -o $(GS_XE)
+ $(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(GS_DOT_O) -s
+ cat $(gsld_tr) >> $(ldt_tr)
+- $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS)
++ $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS) -lcupsimage
+ if [ x$(XLIBDIR) != x ]; then LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; fi; \
+ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
+ PSI_FEATURE_DEVS= FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
diff --git a/packaging/macos/modulesets/patches/graphviz-remove-rpath.patch b/packaging/macos/modulesets/patches/graphviz-remove-rpath.patch
new file mode 100644
index 0000000..857165b
--- /dev/null
+++ b/packaging/macos/modulesets/patches/graphviz-remove-rpath.patch
@@ -0,0 +1,55 @@
+--- a/CMakeLists.txt 2021-03-15 17:04:01.000000000 -0700
++++ b/CMakeLists.txt 2021-07-29 13:42:38.000000000 -0700
+@@ -72,6 +72,8 @@
+ # Name of the config file used by Graphviz
+ set(GVPLUGIN_CONFIG_FILE config${GRAPHVIZ_PLUGIN_VERSION})
+
++set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIR}")
++
+ # ============================ Library dependencies ============================
+ if (WIN32)
+ list(APPEND CMAKE_PREFIX_PATH ${WINDOWS_DEPENDENCY_DIR})
+--- a/plugin/core/CMakeLists.txt 2021-03-15 17:04:01.000000000 -0700
++++ b/plugin/core/CMakeLists.txt 2021-07-29 13:42:09.000000000 -0700
+@@ -53,6 +53,8 @@
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+
++set_target_properties(gvplugin_core PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}")
++
+ # Specify library version and soversion
+ set_target_properties(gvplugin_core PROPERTIES
+ VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0
+--- a/plugin/pango/CMakeLists.txt 2021-03-15 17:04:01.000000000 -0700
++++ b/plugin/pango/CMakeLists.txt 2021-07-29 13:43:13.000000000 -0700
+@@ -40,6 +40,8 @@
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+
++set_target_properties(gvplugin_pango PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}")
++
+ # Include DLLs with this library on Windows
+ if (WIN32)
+ install(
+--- a/plugin/neato_layout/CMakeLists.txt 2021-03-15 17:04:01.000000000 -0700
++++ b/plugin/neato_layout/CMakeLists.txt 2021-07-29 13:42:57.000000000 -0700
+@@ -45,6 +45,8 @@
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+
++set_target_properties(gvplugin_neato_layout PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}")
++
+ # Specify library version and soversion
+ set_target_properties(gvplugin_neato_layout PROPERTIES
+ VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0
+--- a/plugin/dot_layout/CMakeLists.txt 2021-03-15 17:04:01.000000000 -0700
++++ b/plugin/dot_layout/CMakeLists.txt 2021-07-29 13:42:28.000000000 -0700
+@@ -30,6 +30,8 @@
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+
++set_target_properties(gvplugin_dot_layout PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_DIR}")
++
+ # Specify library version and soversion
+ set_target_properties(gvplugin_dot_layout PROPERTIES
+ VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0
diff --git a/packaging/macos/modulesets/patches/gspell-makefile_objc.patch b/packaging/macos/modulesets/patches/gspell-makefile_objc.patch
new file mode 100644
index 0000000..e9a7e65
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gspell-makefile_objc.patch
@@ -0,0 +1,20 @@
+Patch taken from homebrew formula.
+Removed gtk-mac-integration dependency.
+https://github.com/Homebrew/homebrew-core/blob/cd1e31a/Formula/gspell.rb
+diff --git a/gspell/Makefile.am b/gspell/Makefile.am
+index 076a9fd..6c67184 100644
+--- a/gspell/Makefile.am
++++ b/gspell/Makefile.am
+@@ -155,6 +156,12 @@ gspell_private_headers += \
+ gspell_private_c_files += \
+ gspell-osx.c
+
++libgspell_core_la_CFLAGS += \
++ -xobjective-c
++
++libgspell_core_la_LDFLAGS += \
++ -framework Cocoa
++
+ endif # OS_OSX
+
+ if HAVE_INTROSPECTION
diff --git a/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch b/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
new file mode 100644
index 0000000..6d05bc4
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
@@ -0,0 +1,59 @@
+# Remove the dependency on gtk-mac-integration and replace it with a
+# simpler solution.
+diff --git a/configure.ac b/configure.ac
+index 15da2b1..8f3d70c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -204,13 +204,6 @@ AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes")
+
+ if test "$os_osx" = "yes"; then
+ AC_DEFINE([OS_OSX], [1], [Defined if OS is Mac OSX])
+-
+- AX_PKG_CHECK_MODULES([GTK_MAC],
+- [],
+- [gtk-mac-integration-gtk3 >= 2.0.8])
+-
+- AC_SUBST(GTK_MAC_CFLAGS)
+- AC_SUBST(GTK_MAC_LIBS)
+ fi
+
+ # Output files
+diff --git a/gspell/gspell-osx.c b/gspell/gspell-osx.c
+index e3b9615..9d71cbb 100644
+--- a/gspell/gspell-osx.c
++++ b/gspell/gspell-osx.c
+@@ -22,24 +22,24 @@
+ #endif
+
+ #include "gspell-osx.h"
+-#include <gtkosxapplication.h>
++#include <mach-o/dyld.h>
++#include <limits.h>
+ #import <Cocoa/Cocoa.h>
+
+ gchar *
+ _gspell_osx_get_resource_path (void)
+ {
+- gchar *id;
+- gchar *ret = NULL;
+-
+- id = gtkosx_application_get_bundle_id ();
++ uint32_t size = PATH_MAX + 1;
+
+- if (id != NULL)
+- {
+- ret = gtkosx_application_get_resource_path ();
++ gchar* path = (gchar*)g_malloc(size);
++ if (_NSGetExecutablePath(path, &size) == 0) {
++ gchar* contents_dir = g_strstr_len(path, -1, "Contents");
++ g_snprintf(contents_dir, 19, "Contents/Resources");
++ return path;
+ }
+
+- g_free (id);
+- return ret;
++ g_free(path);
++ return NULL;
+ }
+
+ gchar *
diff --git a/packaging/macos/modulesets/patches/gtk+-scale-absolute-value.patch b/packaging/macos/modulesets/patches/gtk+-scale-absolute-value.patch
new file mode 100644
index 0000000..d0a49a1
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gtk+-scale-absolute-value.patch
@@ -0,0 +1,32 @@
+From 36315cbe2b3c9d1c1b7508d9494a251eddbc4452 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Thu, 14 Oct 2021 12:41:05 -0700
+Subject: [PATCH] [quartz]Use the absolute value of Scale values for
+ CGContextScaleSCM
+
+In macOS-12.sdk CGContextConverSizeToDeviceSpace returns a negative
+height and passing that to CGContextScaleCTM in turn causes the cairo
+surface to draw outside the window where it can't be seen. Passing the
+absolute values of the scale factors fixes the display on macOS 12 without
+affecting earlier macOS versions.
+---
+ gdk/quartz/gdkwindow-quartz.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
+index 1a3389bb32..a5c5c31945 100644
+--- a/gdk/quartz/gdkwindow-quartz.c
++++ b/gdk/quartz/gdkwindow-quartz.c
+@@ -183,8 +183,7 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
+ * in gdk_quartz_ref_cairo_surface () */
+ scale = CGContextConvertSizeToDeviceSpace (cg_context,
+ CGSizeMake (1.0, 1.0));
+- CGContextScaleCTM (cg_context, 1.0 / scale.width, 1.0 / scale.height);
+-
++ CGContextScaleCTM (cg_context, 1.0 / fabs(scale.width), 1.0 / fabs(scale.height));
+ return cg_context;
+ }
+
+--
+2.30.1 (Apple Git-130)
+
diff --git a/packaging/macos/modulesets/patches/gtk-3.24.33-quartz-window-transient-for.patch b/packaging/macos/modulesets/patches/gtk-3.24.33-quartz-window-transient-for.patch
new file mode 100644
index 0000000..39435df
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gtk-3.24.33-quartz-window-transient-for.patch
@@ -0,0 +1,46 @@
+From f42f7adc531da47b5c34a05da84ac873618f55ed Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Mon, 28 Mar 2022 11:26:41 -0700
+Subject: [PATCH] [quartz-window]Always ensure that transient_for isn't
+ destroyed before using it.
+
+Fixes crash when destroying a dialog whose transient_for parent is
+already destroyed.
+---
+ gdk/quartz/gdkwindow-quartz.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
+index aa85318e0b..15cde981a0 100644
+--- a/gdk/quartz/gdkwindow-quartz.c
++++ b/gdk/quartz/gdkwindow-quartz.c
+@@ -788,7 +788,7 @@ _gdk_quartz_window_did_become_main (GdkWindow *window)
+ if (window->window_type != GDK_WINDOW_TEMP)
+ main_window_stack = g_slist_prepend (main_window_stack, window);
+
+- if (impl->transient_for)
++ if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
+ raise_transient (impl);
+
+ clear_toplevel_order ();
+@@ -1176,6 +1176,8 @@ _gdk_quartz_window_detach_from_parent (GdkWindow *window)
+ parent_impl = GDK_WINDOW_IMPL_QUARTZ (impl->transient_for->impl);
+ [parent_impl->toplevel removeChildWindow:impl->toplevel];
+ clear_toplevel_order ();
++ g_object_unref (impl->transient_for);
++ impl->transient_for = NULL;
+ }
+ }
+
+@@ -1557,7 +1559,7 @@ gdk_window_quartz_raise (GdkWindow *window)
+
+ impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
+
+- if (impl->transient_for)
++ if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
+ raise_transient (impl);
+ else
+ [impl->toplevel orderFront:impl->toplevel];
+--
+2.32.0 (Apple Git-132)
+
diff --git a/packaging/macos/modulesets/patches/gtk-3.24.33-remove-gtk4-update-icon-cache-dependency.patch b/packaging/macos/modulesets/patches/gtk-3.24.33-remove-gtk4-update-icon-cache-dependency.patch
new file mode 100644
index 0000000..2850343
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gtk-3.24.33-remove-gtk4-update-icon-cache-dependency.patch
@@ -0,0 +1,10 @@
+--- a/meson.build~ 2022-03-04 20:53:25.000000000 -0800
++++ b/meson.build 2022-03-22 15:44:32.000000000 -0700
+@@ -1013,7 +1013,6 @@
+ gnome.post_install(
+ glib_compile_schemas: true,
+ gio_querymodules: gio_module_dirs,
+- gtk_update_icon_cache: get_option('demos'),
+ )
+ else
+ # Keep this in sync with post-install.py expected arguments
diff --git a/packaging/macos/modulesets/patches/gtk-mac-bundler_configure.patch b/packaging/macos/modulesets/patches/gtk-mac-bundler_configure.patch
new file mode 100644
index 0000000..10365cd
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gtk-mac-bundler_configure.patch
@@ -0,0 +1,24 @@
+--- a/configure 2020-11-29 14:24:17.000000000 +0100
++++ b/configure 2020-11-29 14:21:40.000000000 +0100
+@@ -0,0 +1,21 @@
++#!/usr/bin/env bash
++
++# This mocks a configure script to provide an interface for JHBuild.
++# We're only interested in the prefix so we can patch the Makefile.
++
++while [ "$#" -gt 0 ]; do
++ case $1 in
++ --prefix=*) PREFIX=${1:9}; break ;;
++ *) echo "ignoring parameter: $1" ;;
++ esac
++ shift
++done
++
++if [ -z $PREFIX ]; then
++ echo "--prefix=* argument not found"
++ exit 1
++else
++ sed -i "" "/bindir=/a\\
++ bindir=$PREFIX\/bin\\
++ " Makefile
++fi
diff --git a/packaging/macos/modulesets/patches/gtkmm-3-bad-const-property-background.patch b/packaging/macos/modulesets/patches/gtkmm-3-bad-const-property-background.patch
new file mode 100644
index 0000000..4768b2f
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gtkmm-3-bad-const-property-background.patch
@@ -0,0 +1,13 @@
+--- a/tests/builder/main.cc 2021-02-23 01:07:04.000000000 -0800
++++ b/tests/builder/main.cc 2021-04-03 10:28:40.000000000 -0700
+@@ -120,7 +120,7 @@
+ }
+ }
+
+- Glib::PropertyProxy_ReadOnly<Glib::ustring> property_background() const { return m_property_background.get_proxy(); }
++ //Glib::PropertyProxy_ReadOnly<Glib::ustring> property_background() const { return m_property_background.get_proxy(); }
+ Glib::PropertyProxy <Glib::ustring> property_background() { return m_property_background.get_proxy(); }
+ Glib::ustring get_background() const { return m_property_background.get_value(); }
+ void set_background(const Glib::ustring& background){ m_property_background.set_value(background); }
+
+Diff finished. Sat Apr 3 10:38:41 2021
diff --git a/packaging/macos/modulesets/patches/imagemagick_configure_pango.patch b/packaging/macos/modulesets/patches/imagemagick_configure_pango.patch
new file mode 100644
index 0000000..8ce359b
--- /dev/null
+++ b/packaging/macos/modulesets/patches/imagemagick_configure_pango.patch
@@ -0,0 +1,18 @@
+Recently a new issue manifested out of thin air: linking to pango fails with
+missing symbols like '_g_object_unref'. Pango requires '-lgobject-2.0',
+but this does not appear in the linker flags (check invocation with
+'make V=1'). Easiest way for a quick & dirty fix is to configure with
+PANGO_LIBS set accordingly, but the configure scripts deletes the setting
+although claiming to respect it. Therefore we patch the configure
+script first.
+--- a/configure
++++ b/configure
+@@ -31889,7 +31889,7 @@
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pangocairo >= 1.28.1" 2>/dev/null`
++ pkg_cv_PANGO_LIBS="$($PKG_CONFIG --libs pangocairo) -lgobject-2.0"
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
diff --git a/packaging/macos/modulesets/patches/itstool-config-python.patch b/packaging/macos/modulesets/patches/itstool-config-python.patch
new file mode 100644
index 0000000..592c37a
--- /dev/null
+++ b/packaging/macos/modulesets/patches/itstool-config-python.patch
@@ -0,0 +1,14 @@
+diff -c /Users/john/configure\~ /Users/john/configure
+--- a/configure Wed Jul 31 13:57:01 2019
++++ b/configure Wed Jul 31 13:57:39 2019
+@@ -2377,7 +2377,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+
+- for am_cv_pathless_PYTHON in python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
++ for am_cv_pathless_PYTHON in python3 python2 python python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+ test "$am_cv_pathless_PYTHON" = none && break
+ prog="import sys
+ # split strings by '.' and convert to numeric. Append some zeros
+
+Diff finished. Wed Jul 31 13:57:51 2019
diff --git a/packaging/macos/modulesets/patches/libtasn1-inline-fix.patch b/packaging/macos/modulesets/patches/libtasn1-inline-fix.patch
new file mode 100644
index 0000000..10160ab
--- /dev/null
+++ b/packaging/macos/modulesets/patches/libtasn1-inline-fix.patch
@@ -0,0 +1,10 @@
+--- a/lib/parser_aux.c 2021-05-13 08:59:58.000000000 -0700
++++ b/lib/parser_aux.c 2021-08-03 10:25:36.000000000 -0700
+@@ -20,8 +20,9 @@
+ */
+
+ #include <limits.h> // WORD_BIT
++#define _GL_EXTERN_INLINE_STDHEADER_BUG
+
+ #include "int.h"
+ #include "parser_aux.h"
diff --git a/packaging/macos/modulesets/patches/libxml2-python-config.patch b/packaging/macos/modulesets/patches/libxml2-python-config.patch
new file mode 100644
index 0000000..6844fec
--- /dev/null
+++ b/packaging/macos/modulesets/patches/libxml2-python-config.patch
@@ -0,0 +1,23 @@
+--- a/configure.ac 2021-05-13 11:44:23.000000000 -0700
++++ b/configure.ac 2021-11-08 11:13:54.000000000 -0800
+@@ -905,7 +905,17 @@
+ fi
+ fi
+ pythondir='$(PYTHON_SITE_PACKAGES)'
+- PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
++ py_ver_major=$(echo $PYTHON_VERSION | cut -d . -f 1)
++ py_ver_minor=$(echo $PYTHON_VERSION | cut -d . -f 2)
++ if test $py_ver_major -eq 3 -a $py_ver_minor -ge 8
++ then
++ PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags --embed`
++ elif test $py_ver_major -gt 3
++ then
++ PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags --embed`
++ else
++ PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
++ fi
+ else
+ PYTHON=
+ fi
+
+Diff finished. Mon Nov 8 11:28:35 2021
diff --git a/packaging/macos/modulesets/patches/pango-coretext-fix-clang-build-failure.patch b/packaging/macos/modulesets/patches/pango-coretext-fix-clang-build-failure.patch
new file mode 100644
index 0000000..8476d50
--- /dev/null
+++ b/packaging/macos/modulesets/patches/pango-coretext-fix-clang-build-failure.patch
@@ -0,0 +1,30 @@
+From 9093ffd69850b630622a3fc8dcf09c45c51ae2f9 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Tue, 22 Mar 2022 12:09:09 -0700
+Subject: [PATCH] Coretext: fix clang build failure.
+
+Recent versions of clang notice that pango_core_text_fontset_load_font's
+`key` local variable isn't used and errors out. Remove it.
+---
+ pango/pangocoretext-fontmap.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/pango/pangocoretext-fontmap.c b/pango/pangocoretext-fontmap.c
+index 40e62eed..e090bfc4 100644
+--- a/pango/pangocoretext-fontmap.c
++++ b/pango/pangocoretext-fontmap.c
+@@ -1696,11 +1696,8 @@ static PangoFont *
+ pango_core_text_fontset_load_font (PangoCoreTextFontset *ctfontset,
+ CTFontDescriptorRef ctdescriptor)
+ {
+- PangoCoreTextFontsetKey *key;
+ PangoCoreTextFont *font;
+
+- key = pango_core_text_fontset_get_key (ctfontset);
+-
+ /* For now, we will default the fallbacks to not have synthetic italic,
+ * in the future this may be improved.
+ */
+--
+2.32.0 (Apple Git-132)
+
diff --git a/packaging/macos/modulesets/patches/rust_cmake_install.patch b/packaging/macos/modulesets/patches/rust_cmake_install.patch
new file mode 100644
index 0000000..b1025cd
--- /dev/null
+++ b/packaging/macos/modulesets/patches/rust_cmake_install.patch
@@ -0,0 +1,27 @@
+--- a/CMakeLists.txt 2020-11-29 02:35:19.000000000 +0100
++++ b/CMakeLists.txt 2020-11-29 02:35:44.000000000 +0100
+@@ -0,0 +1,24 @@
++# This is a wrapper to install Rust via cmake. Its only purpose is to supply an
++# interface that can be used from JHBuild.
++#
++# usage:
++# cmake -DVERSION=<Rust version>
++# make install
++
++cmake_minimum_required(VERSION 3.1)
++project(rust)
++
++add_custom_command(OUTPUT rust
++ # use bash so we can supply environment variables to rustup-init.sh
++ COMMAND bash "-c" "RUSTUP_HOME=${CMAKE_INSTALL_PREFIX}/home/.rustup CARGO_HOME=${CMAKE_INSTALL_PREFIX}/home/.cargo ${CMAKE_CURRENT_SOURCE_DIR}/rustup-init.sh -y --no-modify-path --profile minimal"
++ COMMAND bash "-c" "${CMAKE_INSTALL_PREFIX}/home/.cargo/bin/rustup toolchain install ${VERSION}"
++ COMMAND bash "-c" "${CMAKE_INSTALL_PREFIX}/home/.cargo/bin/rustup default ${VERSION}"
++ COMMAND bash "-c" "${CMAKE_INSTALL_PREFIX}/home/.cargo/bin/rustup toolchain remove stable"
++)
++
++add_custom_target(
++ install_rust ALL
++ DEPENDS rust
++)
++
++install(DIRECTORY ${CMAKE_INSTALL_PREFIX}/home/.cargo/bin/ DESTINATION bin USE_SOURCE_PERMISSIONS)
diff --git a/packaging/macos/modulesets/patches/shared-mime-info-2.1-freedesktop-generate.patch b/packaging/macos/modulesets/patches/shared-mime-info-2.1-freedesktop-generate.patch
new file mode 100644
index 0000000..d058eda
--- /dev/null
+++ b/packaging/macos/modulesets/patches/shared-mime-info-2.1-freedesktop-generate.patch
@@ -0,0 +1,27 @@
+--- a/data/freedesktop_generate.sh 2020-12-31 11:12:16.000000000 -0800
++++ b/data/freedesktop_generate.sh 2021-11-07 13:50:19.000000000 -0800
+@@ -3,10 +3,17 @@
+ src_root="$1"
+ build_root="$2"
+
+-ninja -C "${build_root}" shared-mime-info-gmo
+-
+-itstool \
+- --its "${src_root}/data/its/shared-mime-info.its" \
+- --join "${src_root}/data/freedesktop.org.xml.in" \
+- -o "${build_root}/data/freedesktop.org.xml" \
+- "${build_root}/po/"*".gmo"
++if test ! -d "${build_root}/po/de"; then
++ ninja -C "${build_root}" shared-mime-info-gmo
++ itstool \
++ --its "${src_root}/data/its/shared-mime-info.its" \
++ --join "${src_root}/data/freedesktop.org.xml.in" \
++ -o "${build_root}/data/freedesktop.org.xml" \
++ "${build_root}/po/"*".gmo"
++else
++ itstool \
++ --its "${src_root}/data/its/shared-mime-info.its" \
++ --join "${src_root}/data/freedesktop.org.xml.in" \
++ -o "${build_root}/data/freedesktop.org.xml" \
++ "${build_root}/po/"*"/LC_MESSAGES/shared-mime-info.mo"
++fi
diff --git a/packaging/macos/modulesets/patches/tiff-nohtml.patch b/packaging/macos/modulesets/patches/tiff-nohtml.patch
new file mode 100644
index 0000000..0368fb0
--- /dev/null
+++ b/packaging/macos/modulesets/patches/tiff-nohtml.patch
@@ -0,0 +1,44 @@
+--- a/configure 2017-05-22 01:49:37.000000000 +0700
++++ b/configure 2017-06-12 02:37:01.000000000 +0700
+@@ -20927,7 +20927,7 @@
+ ac_config_headers="$ac_config_headers libtiff/tif_config.h libtiff/tiffconf.h"
+
+
+-ac_config_files="$ac_config_files Makefile build/Makefile contrib/Makefile contrib/addtiffo/Makefile contrib/dbs/Makefile contrib/dbs/xtiff/Makefile contrib/iptcutil/Makefile contrib/mfs/Makefile contrib/pds/Makefile contrib/ras/Makefile contrib/stream/Makefile contrib/tags/Makefile contrib/win_dib/Makefile html/Makefile html/images/Makefile html/man/Makefile libtiff-4.pc libtiff/Makefile man/Makefile port/Makefile test/Makefile tools/Makefile"
++ac_config_files="$ac_config_files Makefile build/Makefile contrib/Makefile contrib/addtiffo/Makefile contrib/dbs/Makefile contrib/dbs/xtiff/Makefile contrib/iptcutil/Makefile contrib/mfs/Makefile contrib/pds/Makefile contrib/ras/Makefile contrib/stream/Makefile contrib/tags/Makefile contrib/win_dib/Makefile libtiff-4.pc libtiff/Makefile man/Makefile port/Makefile test/Makefile tools/Makefile"
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -22095,9 +22095,6 @@
+ "contrib/stream/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/stream/Makefile" ;;
+ "contrib/tags/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/tags/Makefile" ;;
+ "contrib/win_dib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/win_dib/Makefile" ;;
+- "html/Makefile") CONFIG_FILES="$CONFIG_FILES html/Makefile" ;;
+- "html/images/Makefile") CONFIG_FILES="$CONFIG_FILES html/images/Makefile" ;;
+- "html/man/Makefile") CONFIG_FILES="$CONFIG_FILES html/man/Makefile" ;;
+ "libtiff-4.pc") CONFIG_FILES="$CONFIG_FILES libtiff-4.pc" ;;
+ "libtiff/Makefile") CONFIG_FILES="$CONFIG_FILES libtiff/Makefile" ;;
+ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+--- a/Makefile.in 2017-05-22 01:49:35.000000000 +0700
++++ b/Makefile.in 2017-06-12 02:47:22.000000000 +0700
+@@ -436,7 +436,7 @@
+ nmake.opt
+
+ dist_doc_DATA = $(docfiles)
+-SUBDIRS = port libtiff tools build contrib test man html
++SUBDIRS = port libtiff tools build contrib test man
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libtiff-4.pc
+
+--- a/Makefile.am 2015-09-07 02:30:46.000000000 +0700
++++ b/Makefile.am 2017-06-12 02:46:47.000000000 +0700
+@@ -61,7 +61,7 @@
+ rm -rf $(distdir)/_build/cmake
+ rm -rf $(distdir)/_inst/cmake
+
+-SUBDIRS = port libtiff tools build contrib test man html
++SUBDIRS = port libtiff tools build contrib test man
+
+ release:
+ (rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
+
diff --git a/packaging/macos/modulesets/patches/xmlto-allow-net-access.patch b/packaging/macos/modulesets/patches/xmlto-allow-net-access.patch
new file mode 100644
index 0000000..a4f1280
--- /dev/null
+++ b/packaging/macos/modulesets/patches/xmlto-allow-net-access.patch
@@ -0,0 +1,27 @@
+diff -u /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/xmlto-0.0.28/xmlto.in\~ /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/xmlto-0.0.28/xmlto.in
+--- a/xmlto.in 2015-11-16 06:07:10.000000000 -0800
++++ b/xmlto.in 2021-04-10 13:33:24.000000000 -0700
+@@ -225,7 +225,7 @@
+ export VERBOSE
+
+ # Disable network entities
+-XSLTOPTS="$XSLTOPTS --nonet"
++XSLTOPTS="$XSLTOPTS"
+
+ # The names parameter for the XSLT stylesheet
+ XSLTPARAMS=""
+@@ -542,10 +542,10 @@
+
+ [ "$VERBOSE" -ge 1 ] && \
+ echo >&2 \
+- "\"${XMLLINT_PATH}\" --noout --nonet --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\""
++ "\"${XMLLINT_PATH}\" --noout --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\""
+ # eval is for SEARCHPATH_FORMATTED's proper expansion
+ # make sure expansions are protected from eval
+- eval "\"${XMLLINT_PATH}\" --noout --nonet --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\"" 2>"${VALIDATION}"
++ eval "\"${XMLLINT_PATH}\" --noout --xinclude --postvalid --noent ${SEARCHPATH_FORMATTED} \"${INPUT_FILE}\"" 2>"${VALIDATION}"
+ xmllint_status=$?
+
+ if [ $xmllint_status -ne 0 ]
+
+Diff finished. Sat Apr 10 13:33:31 2021