summaryrefslogtreecommitdiffstats
path: root/packaging/macos/modulesets/patches
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/patches
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/patches')
-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
27 files changed, 1820 insertions, 0 deletions
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