From 48400887cf5a30abf852aea38e7a9262c607c383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jir=CC=8Ci=CC=81=20Techet?= Date: Tue, 21 Mar 2023 20:27:40 +0100 Subject: [PATCH] Update to latest version of gtk-osx modulesets --- modulesets-stable/bootstrap.modules | 299 +++++---- modulesets-stable/gtk-osx-bootstrap.modules | 205 ++++--- modulesets-stable/gtk-osx-gstreamer.modules | 176 +++--- modulesets-stable/gtk-osx-gtkmm.modules | 230 +++---- modulesets-stable/gtk-osx-javascript.modules | 85 ++- modulesets-stable/gtk-osx-network.modules | 364 ++++++----- modulesets-stable/gtk-osx-python.modules | 118 ++-- modulesets-stable/gtk-osx-random.modules | 361 ++++++----- modulesets-stable/gtk-osx.modules | 571 ++++++++++-------- ...Cairo-quartz-surface-create-internal.patch | 313 ---------- ...uartz-version-detection-for-macOS-12.patch | 67 -- .../cairo-1.17.6-snapshot-memory-leak.patch | 27 + patches/cairo-freetype-font-variations.patch | 32 - patches/cairo-image-refcount.patch | 36 -- ...autotools.patch => getopt-autotools.patch} | 0 patches/girscanner-objc.patch | 20 - patches/gnutls-pkg-config-pc.patch | 13 + patches/gtk+-scale-absolute-value.patch | 32 - ...-3-24-36-call-gdk-quartz-osx-version.patch | 25 + ...gtk-3-24-36-image-recolor-load-crash.patch | 35 ++ patches/gtk-3-24-36-match-window-size.patch | 164 +++++ patches/libxml2-python-config.patch | 36 +- ...libxml2.9.10-conditional-parentheses.patch | 74 --- patches/libxslt-python-config.patch | 13 + ...ngo-coretext-fix-clang-build-failure.patch | 30 + patches/tiff-nohtml.patch | 89 +-- 26 files changed, 1780 insertions(+), 1635 deletions(-) delete mode 100644 patches/Cairo-quartz-surface-create-internal.patch delete mode 100644 patches/Quartz-version-detection-for-macOS-12.patch create mode 100644 patches/cairo-1.17.6-snapshot-memory-leak.patch delete mode 100644 patches/cairo-freetype-font-variations.patch delete mode 100644 patches/cairo-image-refcount.patch rename patches/{frodo-getopt-autotools.patch => getopt-autotools.patch} (100%) delete mode 100644 patches/girscanner-objc.patch create mode 100644 patches/gnutls-pkg-config-pc.patch delete mode 100644 patches/gtk+-scale-absolute-value.patch create mode 100644 patches/gtk-3-24-36-call-gdk-quartz-osx-version.patch create mode 100644 patches/gtk-3-24-36-image-recolor-load-crash.patch create mode 100644 patches/gtk-3-24-36-match-window-size.patch delete mode 100644 patches/libxml2.9.10-conditional-parentheses.patch create mode 100644 patches/libxslt-python-config.patch create mode 100644 patches/pango-coretext-fix-clang-build-failure.patch diff --git a/modulesets-stable/bootstrap.modules b/modulesets-stable/bootstrap.modules index 0aea8260..ec43f6ed 100644 --- a/modulesets-stable/bootstrap.modules +++ b/modulesets-stable/bootstrap.modules @@ -1,158 +1,221 @@ - + + - - - - - - - - + + + + + + + + + + + + - - - - - + + + - - - - + + + + - - - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + hash="sha256:e8a6eb9d28ddcba8ffef3fa211653239e9bf239aba6a01a6b7cfc7ceaec69cbd" + repo="ftp.gnu.org" /> - - - - + + + + - - - - + + + - + - - - + + + - - - - + + - + hash="sha256:67d68ce1e22192050525643fc0a7a22297576682bef6a5c51446903f5aeef3cf" + repo="ftp.gnu.org" /> - + - - - + + + version="2.6.4" + hash="sha256:e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995" + repo="github" /> - - - - + + hash="sha256:fcf497688a1d531b192301bd09c55adefda5a662729a58eb8a895166e38ef219" + repo="github" /> - - - + + - + + --> - + - - - + + + + - + - - - - - + + + + + - + diff --git a/modulesets-stable/gtk-osx-bootstrap.modules b/modulesets-stable/gtk-osx-bootstrap.modules index 8e76d745..571749e8 100644 --- a/modulesets-stable/gtk-osx-bootstrap.modules +++ b/modulesets-stable/gtk-osx-bootstrap.modules @@ -2,117 +2,158 @@ + + + + + + + + + + + + + - + - - - - + + + - - - - + + + + - + - - - - + - - - + + + + - + - - - + + + + + - + - - - - + + + + - + - - - + + + - - - + + + - - + + - - + - - + + + - - - - + + + + - + diff --git a/modulesets-stable/gtk-osx-gstreamer.modules b/modulesets-stable/gtk-osx-gstreamer.modules index 966da11c..8ab64360 100644 --- a/modulesets-stable/gtk-osx-gstreamer.modules +++ b/modulesets-stable/gtk-osx-gstreamer.modules @@ -2,120 +2,140 @@ - - - - + + + + + + + - + + + - - - - - + - - + + + + + - + autogenargs="--enable-gpl --enable-version3 --enable-shared --disable-static --disable-runtime-cpudetect --disable-programs --disable-ffplay --disable-ffprobe --disable-doc"> + + - + - + - + - + - - - + + + - - + + - - + - + - + - - + + - + - + - - + + - + - + - - - - + + + + - + - + - - - + + + - + - - - - - - + + + + + + - + diff --git a/modulesets-stable/gtk-osx-gtkmm.modules b/modulesets-stable/gtk-osx-gtkmm.modules index 802cb2df..72c062f4 100644 --- a/modulesets-stable/gtk-osx-gtkmm.modules +++ b/modulesets-stable/gtk-osx-gtkmm.modules @@ -2,149 +2,177 @@ - - - - + + + + + - + - - - - + + - + - - + + - + - + - - - + + + - - - + + + - - - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - + - - - + + + - + - + - - - - + + + + - + - + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + - + + - - - - - + + + + + - + - + - - - - - + + + + + - + diff --git a/modulesets-stable/gtk-osx-javascript.modules b/modulesets-stable/gtk-osx-javascript.modules index bc5095ca..4c8a26d2 100644 --- a/modulesets-stable/gtk-osx-javascript.modules +++ b/modulesets-stable/gtk-osx-javascript.modules @@ -2,57 +2,78 @@ + + + + - + - - + + + + - - - - + + - - + + - - + - - + + + - - - + + + - - - - + + + - + diff --git a/modulesets-stable/gtk-osx-network.modules b/modulesets-stable/gtk-osx-network.modules index 2bf64c92..34165ea9 100644 --- a/modulesets-stable/gtk-osx-network.modules +++ b/modulesets-stable/gtk-osx-network.modules @@ -2,210 +2,264 @@ - - - - - - - - - + + tidy -config ../tidy.conf -m gtk-osx-network.modules + --> + + + + + + + + + + - - + + - - - + - + autogenargs="shared" + makeinstallargs="install_sw" + supports-non-srcdir-builds="no"> + - - - + - - - + + - - + + + - - - + - - + + - - - - + + + + - + - + - - + - - + - - + + - + - - + + + - - - - - + + + + + - - + - - + - - - + + + - + - - - + + + - - + + - - - + + + - - + + - + - + - - - - + + + + - + + version="40.0" /> - - + + - - + + + hash="sha256:0b235e85ad26b3c0d12255d0963c460e5a639c4722f78e2a03e969e224b29f6e" /> - + - + - - - + + + - - - + + - - - - - - + + + + + + - - - + + + + - - - + USE_WPE_RENDERER: For embedded systems, not Macs. + --> - - - - - + cmakeargs='-DPORT=GTK -DENABLE_X11_TARGET=OFF -DENABLE_QUARTZ_TARGET=ON -DENABLE_MINIBROWSER=ON -DENABLE_INTROSPECTION=ON -DUSE_SYSTEMD=OFF -DENABLE_VIDEO=OFF -DENABLE_WEB_AUDIO=OFF -DENABLE_GEOLOCATION=OFF -DUSE_LIBNOTIFY=OFF -DUSE_LIBHYPHEN=OFF -DUSE_LIBSECRET=OFF -DENABLE_TOUCH_EVENTS=OFF -DUSE_OPENJPEG=OFF -DUSE_WOFF2=OFF -DUSE_WPE_RENDERER=OFF -DENABLE_GRAPHICS_CONTEXT_GL=OFF -DENABLE_GAMEPAD=OFF -DUSE_APPLE_ICU=NO -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_MACOSX_RPATH=OFF'> + + + + + + - - - - - - + + + + + + - + - + diff --git a/modulesets-stable/gtk-osx-python.modules b/modulesets-stable/gtk-osx-python.modules index 60370e91..92090ffb 100644 --- a/modulesets-stable/gtk-osx-python.modules +++ b/modulesets-stable/gtk-osx-python.modules @@ -2,84 +2,104 @@ + + + + + + + + - - - + + + - + - - - - + + + - - + + + - + - + hash="sha256:5695a10cb7f9ae0d01f665b56602a845b0a8cb17e2123bfece10c2e58552468c" + repo="github-tarball" /> - - - + + + - - - + + + - + - + - - - + + - + + - - - + - + - - + - + - + diff --git a/modulesets-stable/gtk-osx-random.modules b/modulesets-stable/gtk-osx-random.modules index 3238ddbf..89d85074 100644 --- a/modulesets-stable/gtk-osx-random.modules +++ b/modulesets-stable/gtk-osx-random.modules @@ -2,235 +2,304 @@ - - - - - - - - - - - - + + + + + + + + + + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + - + + - + - + - - + + - - - - - - + + + + + + - - - + + - - + + - - - + - + - - - + + + - + - - + + - - + - - + + - + + - + version="0.0.28" + hash="sha256:1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276" + repo="paguire"> + - + - - + + - + version="2.1" + hash="sha256:b2d40cfcdd84e835d0f2c9107b3f3e77e9cf912f858171fe779946da634e8563" + repo="shared-mime-info"> + - - + + - + + hash="sha256:f1b83bf023c0261eacd0ed36066b76f4a520bbcb14bb69c402b7959257125685" /> - + - - - - + + + - - - - - + + + - + - - - - - + + + - + - - - + + + repo="github-tarball" /> - - - - + + + - + - + - - - + + - - + hash="sha256:b040f63836b347eb344f5542443dc254621805072f7141d49c067ecb5a375732" + repo="sourceforge"> + + - - + + - + - - + - - - - + + + - - + + + version="4.1" + hash="sha256:67117fb76f32c8fb5e37d2d60bce238f1f8e865cc7b569a57cbc3017ca15488a" + repo="iso-codes" /> - + diff --git a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules index d0c797c6..ef0ece72 100644 --- a/modulesets-stable/gtk-osx.modules +++ b/modulesets-stable/gtk-osx.modules @@ -1,359 +1,444 @@ - + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + - + - - - + + + - + - - - + + + - - + - + + - - - + + - - + + + + - - - + - + - - - - + + + + - - - + + + - - - + + + + - - + + - - + - + + - + - - - - + + + - + - - + - - + + - - - - + + + + - + - + - - + + - + - - - - + + + + - - - + + + - - - + + + + + + --> - - - + + - + + - - - - + + + + - - + + - + - - - + + - - - + + + - - - + + - + + - - + + - + - + - + - + - + - + repo="github-tarball" /> - + - - - - - - + + + + + + + - - - - - - - + + + + + + + - + - - - - + + + - - + + - - + - - + repo="github-tarball" /> - - - - - - - - - - + + + + + + + + + + + - - + - + + - + - - + - + - - - - + + + + - - - + + + - - + + + hash="sha256:5e85b5adc8dee666900fcaf271ba717f7dcb9d0a03d96dae08f9cbd27e18b1e0" /> - + - - + - + diff --git a/patches/Cairo-quartz-surface-create-internal.patch b/patches/Cairo-quartz-surface-create-internal.patch deleted file mode 100644 index 70befab1..00000000 --- a/patches/Cairo-quartz-surface-create-internal.patch +++ /dev/null @@ -1,313 +0,0 @@ -From 4770f42c01863e44ca1704e5310597c9339acfb2 Mon Sep 17 00:00:00 2001 -From: John Ralls -Date: Mon, 30 Nov 2020 14:10:18 -0800 -Subject: [PATCH] Ensure _cairo_quartz_surface_create_internal always nulls - imageSurfaceEquiv. - ---- - src/cairo-quartz-image-surface.c | 45 +++++++------- - src/cairo-quartz-surface.c | 100 +++++++++++++++---------------- - 2 files changed, 73 insertions(+), 72 deletions(-) - -diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c -index 84d56c9b4..30d92d6be 100644 ---- a/src/cairo-quartz-image-surface.c -+++ b/src/cairo-quartz-image-surface.c -@@ -50,10 +50,9 @@ - #define SURFACE_ERROR_INVALID_FORMAT (_cairo_surface_create_in_error(_cairo_error(CAIRO_STATUS_INVALID_FORMAT))) - - static void --DataProviderReleaseCallback (void *info, const void *data, size_t size) -+DataProviderReleaseCallback (void *image_info, const void *data, size_t size) - { -- cairo_surface_t *surface = (cairo_surface_t *) info; -- cairo_surface_destroy (surface); -+ free (image_info); - } - - static cairo_surface_t * -@@ -88,9 +87,8 @@ _cairo_quartz_image_surface_finish (void *asurface) - { - cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface; - -- /* the imageSurface will be destroyed by the data provider's release callback */ - CGImageRelease (surface->image); -- -+ cairo_surface_destroy ( (cairo_surface_t*) surface->imageSurface); - return CAIRO_STATUS_SUCCESS; - } - -@@ -147,24 +145,29 @@ _cairo_quartz_image_surface_flush (void *asurface, - cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface; - CGImageRef oldImage = surface->image; - CGImageRef newImage = NULL; -- -+ void *image_data; -+ const unsigned int size = surface->imageSurface->height * surface->imageSurface->stride; - if (flags) - return CAIRO_STATUS_SUCCESS; - - /* XXX only flush if the image has been modified. */ - -- /* To be released by the ReleaseCallback */ -- cairo_surface_reference ((cairo_surface_t*) surface->imageSurface); -+ image_data = _cairo_malloc_ab ( surface->imageSurface->height, -+ surface->imageSurface->stride); -+ if (unlikely (!image_data)) -+ return _cairo_error (CAIRO_STATUS_NO_MEMORY); - -+ memcpy (image_data, surface->imageSurface->data, -+ surface->imageSurface->height * surface->imageSurface->stride); - newImage = CairoQuartzCreateCGImage (surface->imageSurface->format, - surface->imageSurface->width, - surface->imageSurface->height, - surface->imageSurface->stride, -- surface->imageSurface->data, -+ image_data, - TRUE, - NULL, - DataProviderReleaseCallback, -- surface->imageSurface); -+ image_data); - - surface->image = newImage; - CGImageRelease (oldImage); -@@ -308,7 +311,7 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface) - cairo_image_surface_t *image_surface; - int width, height, stride; - cairo_format_t format; -- unsigned char *data; -+ void *image_data; - - if (surface->status) - return surface; -@@ -321,7 +324,6 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface) - height = image_surface->height; - stride = image_surface->stride; - format = image_surface->format; -- data = image_surface->data; - - if (!_cairo_quartz_verify_surface_size(width, height)) - return SURFACE_ERROR_INVALID_SIZE; -@@ -338,20 +340,21 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface) - - memset (qisurf, 0, sizeof(cairo_quartz_image_surface_t)); - -- /* In case the create_cgimage fails, this ref will -- * be released via the callback (which will be called in -- * case of failure.) -- */ -- cairo_surface_reference (surface); -+ image_data = _cairo_malloc_ab (height, stride); -+ if (unlikely (!image_data)) { -+ free(qisurf); -+ return SURFACE_ERROR_NO_MEMORY; -+ } - -+ memcpy (image_data, image_surface->data, height * stride); - image = CairoQuartzCreateCGImage (format, - width, height, - stride, -- data, -+ image_data, - TRUE, - NULL, - DataProviderReleaseCallback, -- image_surface); -+ image_data); - - if (!image) { - free (qisurf); -@@ -368,7 +371,7 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface) - qisurf->height = height; - - qisurf->image = image; -- qisurf->imageSurface = image_surface; -+ qisurf->imageSurface = (cairo_image_surface_t*) cairo_surface_reference(surface); - - return &qisurf->base; - } -@@ -381,7 +384,7 @@ cairo_quartz_image_surface_get_image (cairo_surface_t *asurface) - - /* Throw an error for a non-quartz surface */ - if (! _cairo_surface_is_quartz (asurface)) { -- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH)); -+ return SURFACE_ERROR_TYPE_MISMATCH; - } - - return (cairo_surface_t*) surface->imageSurface; -diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c -index 65d03080a..7a9f52401 100644 ---- a/src/cairo-quartz-surface.c -+++ b/src/cairo-quartz-surface.c -@@ -778,20 +778,10 @@ CairoQuartzCreateGradientFunction (const cairo_gradient_pattern_t *gradient, - &gradient_callbacks); - } - --/* Obtain a CGImageRef from a #cairo_surface_t * */ -- --typedef struct { -- cairo_surface_t *surface; -- cairo_image_surface_t *image_out; -- void *image_extra; --} quartz_source_image_t; -- - static void - DataProviderReleaseCallback (void *info, const void *data, size_t size) - { -- quartz_source_image_t *source_img = info; -- _cairo_surface_release_source_image (source_img->surface, source_img->image_out, source_img->image_extra); -- free (source_img); -+ free (info); - } - - static cairo_status_t -@@ -803,8 +793,9 @@ _cairo_surface_to_cgimage (cairo_surface_t *source, - CGImageRef *image_out) - { - cairo_status_t status; -- quartz_source_image_t *source_img; - cairo_image_surface_t *image_surface; -+ void *image_data, *image_extra; -+ cairo_bool_t acquired = FALSE; - - if (source->backend && source->backend->type == CAIRO_SURFACE_TYPE_QUARTZ_IMAGE) { - cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) source; -@@ -826,19 +817,12 @@ _cairo_surface_to_cgimage (cairo_surface_t *source, - } - } - -- source_img = _cairo_malloc (sizeof (quartz_source_image_t)); -- if (unlikely (source_img == NULL)) -- return _cairo_error (CAIRO_STATUS_NO_MEMORY); -- -- source_img->surface = source; -- - if (source->type == CAIRO_SURFACE_TYPE_RECORDING) { - image_surface = (cairo_image_surface_t *) - cairo_image_surface_create (format, extents->width, extents->height); - if (unlikely (image_surface->base.status)) { - status = image_surface->base.status; - cairo_surface_destroy (&image_surface->base); -- free (source_img); - return status; - } - -@@ -848,46 +832,61 @@ _cairo_surface_to_cgimage (cairo_surface_t *source, - NULL); - if (unlikely (status)) { - cairo_surface_destroy (&image_surface->base); -- free (source_img); - return status; - } - -- source_img->image_out = image_surface; -- source_img->image_extra = NULL; -- - cairo_matrix_init_identity (matrix); - } - else { -- status = _cairo_surface_acquire_source_image (source_img->surface, -- &source_img->image_out, -- &source_img->image_extra); -- if (unlikely (status)) { -- free (source_img); -+ status = _cairo_surface_acquire_source_image (source, &image_surface, -+ &image_extra); -+ if (unlikely (status)) - return status; -- } -+ acquired = TRUE; - } - -- if (source_img->image_out->width == 0 || source_img->image_out->height == 0) { -+ if (image_surface->width == 0 || image_surface->height == 0) { - *image_out = NULL; -- DataProviderReleaseCallback (source_img, -- source_img->image_out->data, -- source_img->image_out->height * source_img->image_out->stride); -- } else { -- *image_out = CairoQuartzCreateCGImage (source_img->image_out->format, -- source_img->image_out->width, -- source_img->image_out->height, -- source_img->image_out->stride, -- source_img->image_out->data, -- TRUE, -- NULL, -- DataProviderReleaseCallback, -- source_img); -- -- /* TODO: differentiate memory error and unsupported surface type */ -- if (unlikely (*image_out == NULL)) -- status = CAIRO_INT_STATUS_UNSUPPORTED; -+ if (acquired) -+ _cairo_surface_release_source_image (source, image_surface, image_extra); -+ else -+ cairo_surface_destroy (&image_surface->base); -+ -+ return status; - } - -+ image_data = _cairo_malloc_ab (image_surface->height, image_surface->stride); -+ if (unlikely (!image_data)) -+ { -+ if (acquired) -+ _cairo_surface_release_source_image (source, image_surface, image_extra); -+ else -+ cairo_surface_destroy (&image_surface->base); -+ -+ return _cairo_error (CAIRO_STATUS_NO_MEMORY); -+ } -+ -+ memcpy (image_data, image_surface->data, -+ image_surface->height * image_surface->stride); -+ *image_out = CairoQuartzCreateCGImage (image_surface->format, -+ image_surface->width, -+ image_surface->height, -+ image_surface->stride, -+ image_data, -+ TRUE, -+ NULL, -+ DataProviderReleaseCallback, -+ image_data); -+ -+ /* TODO: differentiate memory error and unsupported surface type */ -+ if (unlikely (*image_out == NULL)) -+ status = CAIRO_INT_STATUS_UNSUPPORTED; -+ -+ if (acquired) -+ _cairo_surface_release_source_image (source, image_surface, image_extra); -+ else -+ cairo_surface_destroy (&image_surface->base); -+ - return status; - } - -@@ -2273,11 +2272,13 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext, - surface->extents.width = width; - surface->extents.height = height; - surface->virtual_extents = surface->extents; -+ surface->imageData = NULL; -+ surface->imageSurfaceEquiv = NULL; -+ - - if (IS_EMPTY (surface)) { - surface->cgContext = NULL; - surface->cgContextBaseCTM = CGAffineTransformIdentity; -- surface->imageData = NULL; - surface->base.is_clear = TRUE; - return surface; - } -@@ -2290,9 +2291,6 @@ _cairo_quartz_surface_create_internal (CGContextRef cgContext, - surface->cgContext = cgContext; - surface->cgContextBaseCTM = CGContextGetCTM (cgContext); - -- surface->imageData = NULL; -- surface->imageSurfaceEquiv = NULL; -- - return surface; - } - --- -2.24.3 (Apple Git-128) - diff --git a/patches/Quartz-version-detection-for-macOS-12.patch b/patches/Quartz-version-detection-for-macOS-12.patch deleted file mode 100644 index 69c75869..00000000 --- a/patches/Quartz-version-detection-for-macOS-12.patch +++ /dev/null @@ -1,67 +0,0 @@ -From a752e338381bc37dbe8d4c04ec23e4f6fd911b30 Mon Sep 17 00:00:00 2001 -From: John Ralls -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/patches/cairo-1.17.6-snapshot-memory-leak.patch b/patches/cairo-1.17.6-snapshot-memory-leak.patch new file mode 100644 index 00000000..3c10fe71 --- /dev/null +++ b/patches/cairo-1.17.6-snapshot-memory-leak.patch @@ -0,0 +1,27 @@ +From 243938c61a08dac8911153352e55933e0618581e Mon Sep 17 00:00:00 2001 +From: John Ralls +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); +-- +2.32.0 (Apple Git-132) + diff --git a/patches/cairo-freetype-font-variations.patch b/patches/cairo-freetype-font-variations.patch deleted file mode 100644 index ca394ee8..00000000 --- a/patches/cairo-freetype-font-variations.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/test/Makefile.am 2018-08-16 18:10:53.000000000 -0700 -+++ b/test/Makefile.am 2018-11-08 20:40:55.000000000 -0800 -@@ -158,8 +158,10 @@ - svg-clip \ - svg-surface \ - toy-font-face \ --font-variations \ - user-data -+#if CAIRO_HAS_FT_FONT -+NOLOG_TESTS += font-variations -+#endif - - # A target to summarise the failures - check-summary: ---- a/test/Makefile.sources 2018-08-16 18:10:53.000000000 -0700 -+++ b/test/Makefile.sources 2018-11-08 20:39:26.000000000 -0800 -@@ -144,7 +144,6 @@ - font-face-get-type.c \ - font-matrix-translation.c \ - font-options.c \ -- font-variations.c \ - glyph-cache-pressure.c \ - get-and-set.c \ - get-clip.c \ -@@ -399,5 +398,6 @@ - - ft_font_test_sources = \ - bitmap-font.c \ -+ font-variations.c \ - ft-font-create-for-ft-face.c \ - ft-show-glyphs-positioning.c \ - ft-show-glyphs-table.c \ \ No newline at end of file diff --git a/patches/cairo-image-refcount.patch b/patches/cairo-image-refcount.patch deleted file mode 100644 index 619cfc21..00000000 --- a/patches/cairo-image-refcount.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 59bf3ca963a3e256bc6806497f529eaccb8471a6 Mon Sep 17 00:00:00 2001 -From: John Ralls -Date: Tue, 11 Aug 2020 15:26:16 -0700 -Subject: [PATCH] Ref and destroy the cairo surface handed off to CoreGraphics. - -Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/420. ---- - src/cairo-quartz-surface.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c -index 65d03080a..5e4bf6a32 100644 ---- a/src/cairo-quartz-surface.c -+++ b/src/cairo-quartz-surface.c -@@ -790,7 +790,8 @@ static void - DataProviderReleaseCallback (void *info, const void *data, size_t size) - { - quartz_source_image_t *source_img = info; -- _cairo_surface_release_source_image (source_img->surface, source_img->image_out, source_img->image_extra); -+ cairo_surface_destroy(source_img->surface); -+ - free (source_img); - } - -@@ -830,7 +831,7 @@ _cairo_surface_to_cgimage (cairo_surface_t *source, - if (unlikely (source_img == NULL)) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); - -- source_img->surface = source; -+ source_img->surface = cairo_surface_reference(source); - - if (source->type == CAIRO_SURFACE_TYPE_RECORDING) { - image_surface = (cairo_image_surface_t *) --- -2.24.3 (Apple Git-128) - diff --git a/patches/frodo-getopt-autotools.patch b/patches/getopt-autotools.patch similarity index 100% rename from patches/frodo-getopt-autotools.patch rename to patches/getopt-autotools.patch diff --git a/patches/girscanner-objc.patch b/patches/girscanner-objc.patch deleted file mode 100644 index 76d2bee9..00000000 --- a/patches/girscanner-objc.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l -index 6a40398..40f1fc0 100644 ---- a/giscanner/scannerlexer.l -+++ b/giscanner/scannerlexer.l -@@ -108,6 +108,7 @@ stringtext ([^\\\"])|(\\.) - "|" { return '|'; } - "~" { return '~'; } - "!" { return '!'; } -+"@" { return '@'; } - "=" { return '='; } - "<" { return '<'; } - ">" { return '>'; } -@@ -199,6 +200,7 @@ stringtext ([^\\\"])|(\\.) - - "\""{stringtext}*"\"" { return STRING; } - "L\""{stringtext}*"\"" { return STRING; } -+"@\""{stringtext}*"\"" { return STRING; } - - . { if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); } - diff --git a/patches/gnutls-pkg-config-pc.patch b/patches/gnutls-pkg-config-pc.patch new file mode 100644 index 00000000..94d6bffe --- /dev/null +++ b/patches/gnutls-pkg-config-pc.patch @@ -0,0 +1,13 @@ +diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in +index eeb957cb7..6a66ac464 100644 +--- a/lib/gnutls.pc.in ++++ b/lib/gnutls.pc.in +@@ -18,7 +18,7 @@ Name: GnuTLS + Description: Transport Security Layer implementation for the GNU system + URL: https://www.gnutls.org/ + Version: @VERSION@ +-Libs: -L${libdir} -lgnutls ++Libs: -L${libdir} -lgnutls -lgcrypt + Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @INET_PTON_LIB@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBATOMIC_LIBS@ @GNUTLS_LIBS_PRIVATE@ + @GNUTLS_REQUIRES_PRIVATE@ + Cflags: -I${includedir} diff --git a/patches/gtk+-scale-absolute-value.patch b/patches/gtk+-scale-absolute-value.patch deleted file mode 100644 index d0a49a13..00000000 --- a/patches/gtk+-scale-absolute-value.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 36315cbe2b3c9d1c1b7508d9494a251eddbc4452 Mon Sep 17 00:00:00 2001 -From: John Ralls -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/patches/gtk-3-24-36-call-gdk-quartz-osx-version.patch b/patches/gtk-3-24-36-call-gdk-quartz-osx-version.patch new file mode 100644 index 00000000..737cd074 --- /dev/null +++ b/patches/gtk-3-24-36-call-gdk-quartz-osx-version.patch @@ -0,0 +1,25 @@ +From 10689066e33eb07d5d2bbdd8cc12d15fe173db58 Mon Sep 17 00:00:00 2001 +From: John Ralls +Date: Fri, 6 Jan 2023 10:13:02 -0800 +Subject: [PATCH] [quartz] Fix typo to call function. + +--- + gdk/quartz/gdkevents-quartz.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c +index 60e9eaf131..630be6e1c7 100644 +--- a/gdk/quartz/gdkevents-quartz.c ++++ b/gdk/quartz/gdkevents-quartz.c +@@ -858,7 +858,7 @@ find_window_for_ns_event (NSEvent *nsevent, + * macOS versions. These trigger 4 pixels out from the window's + * frame so we obtain that rect and adjust it for hit testing. + */ +- if (!nsevent.trackingArea && gdk_quartz_osx_version >= GDK_OSX_VENTURA) ++ if (!nsevent.trackingArea && gdk_quartz_osx_version() >= GDK_OSX_VENTURA) + { + static const int border_width = 4; + NSRect frame = nsevent.window.frame; +-- +2.37.1 (Apple Git-137.1) + diff --git a/patches/gtk-3-24-36-image-recolor-load-crash.patch b/patches/gtk-3-24-36-image-recolor-load-crash.patch new file mode 100644 index 00000000..18b5a63b --- /dev/null +++ b/patches/gtk-3-24-36-image-recolor-load-crash.patch @@ -0,0 +1,35 @@ +From 40bcba64548bb29b6a6209030eeb06bf13ca98f9 Mon Sep 17 00:00:00 2001 +From: John Ralls +Date: Fri, 23 Dec 2022 13:27:50 -0800 +Subject: [PATCH] Don't rely on gtk_icon_info_load_symbolic to set a GError. + +--- + gtk/gtkcssimagerecolor.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/gtk/gtkcssimagerecolor.c b/gtk/gtkcssimagerecolor.c +index 1c38654cfa..db7d08f008 100644 +--- a/gtk/gtkcssimagerecolor.c ++++ b/gtk/gtkcssimagerecolor.c +@@ -125,12 +125,17 @@ gtk_css_image_recolor_load (GtkCssImageRecolor *recolor, + if (gerror) + { + char *uri; ++ char *msg; ++ if (local_error && local_error->message) ++ msg = local_error->message; ++ else ++ msg = "gtk_icon_info_load_symbolic did not set the passed-in GError."; + + uri = g_file_get_uri (url->file); + g_set_error (gerror, + GTK_CSS_PROVIDER_ERROR, + GTK_CSS_PROVIDER_ERROR_FAILED, +- "Error loading image '%s': %s", uri, local_error->message); ++ "Error loading image '%s': %s", uri, msg); + g_error_free (local_error); + g_free (uri); + } +-- +2.37.1 (Apple Git-137.1) + diff --git a/patches/gtk-3-24-36-match-window-size.patch b/patches/gtk-3-24-36-match-window-size.patch new file mode 100644 index 00000000..aa34ba4f --- /dev/null +++ b/patches/gtk-3-24-36-match-window-size.patch @@ -0,0 +1,164 @@ +From f60359c183cc24435521b3d3bbcfc4ebb2a79197 Mon Sep 17 00:00:00 2001 +From: John Ralls +Date: Thu, 19 Jan 2023 10:37:55 -0800 +Subject: [PATCH] [quartz] GdkWindow, GdkNSView frame and cairo surface same + size. + +The cairo surface must be padded to 4 pixels in order to +transfer correctly to the GPU. The GdkWindow and GdkNSView's +content frame must be the same width, otherwise there's a mismatch +that causes either the GdkWindow to draw wider than the frame or the +frame to be clipped narrower than the title bar. + +Fixes #5535. +--- + gdk/quartz/GdkQuartzNSWindow.c | 14 +++++++++++--- + gdk/quartz/GdkQuartzView.c | 15 ++++++++++----- + gdk/quartz/gdkprivate-quartz.h | 3 ++- + gdk/quartz/gdkwindow-quartz.c | 10 ++++++++-- + 4 files changed, 31 insertions(+), 11 deletions(-) + +diff --git a/gdk/quartz/GdkQuartzNSWindow.c b/gdk/quartz/GdkQuartzNSWindow.c +index f0e57434f4..5a546891aa 100644 +--- a/gdk/quartz/GdkQuartzNSWindow.c ++++ b/gdk/quartz/GdkQuartzNSWindow.c +@@ -229,6 +229,9 @@ + GdkWindow *window = [[self contentView] gdkWindow]; + GdkEvent *event; + gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED; ++ /* Alignment to 4 pixels is on scaled pixels and these are unscaled pixels so divide by scale to compensate. */ ++ const gint scale = gdk_window_get_scale_factor (window); ++ const guint align = GDK_WINDOW_QUARTZ_ALIGNMENT / scale; + + /* see same in windowDidMove */ + if (maximized && !inMaximizeTransition && !NSEqualRects (lastMaximizedFrame, [self frame])) +@@ -241,13 +244,18 @@ + window->width = content_rect.size.width; + window->height = content_rect.size.height; + ++ if(window->width % align) ++ content_rect.size.width += align - window->width % align; ++ ++ content_rect.origin.x = 0; ++ content_rect.origin.y = 0; ++ ++ [[self contentView] setFrame:content_rect]; ++ + /* Certain resize operations (e.g. going fullscreen), also move the + * origin of the window. + */ + _gdk_quartz_window_update_position (window); +- +- [[self contentView] setFrame:NSMakeRect (0, 0, window->width, window->height)]; +- + _gdk_window_update_size (window); + + /* Synthesize a configure event */ +diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c +index bd34365a1e..81c2d32007 100644 +--- a/gdk/quartz/GdkQuartzView.c ++++ b/gdk/quartz/GdkQuartzView.c +@@ -424,8 +424,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, + return; + + ++impl->in_paint_rect_count; +- cairo_rect_from_nsrect (&bounds_rect, &backing_bounds); +- bounds_region = cairo_region_create_rectangle (&bounds_rect); ++ + if (impl->needs_display_region) + { + cairo_region_t *region = impl->needs_display_region; +@@ -439,7 +438,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, + cairo_region_t *region; + + cairo_rect_from_nsrect (&bounds, &layer_bounds); +- region = cairo_region_create_rectangle (&bounds); ++ region = cairo_region_create_rectangle(&bounds); + _gdk_window_process_updates_recurse (gdk_window, region); + cairo_region_destroy (region); + } +@@ -447,8 +446,6 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, + if (!impl || !impl->cairo_surface) + return; + +- impl_rect.width = cairo_image_surface_get_width (impl->cairo_surface); +- impl_rect.height = cairo_image_surface_get_height (impl->cairo_surface); + CVPixelBufferLockBaseAddress (pixels, 0); + cvpb_surface = + cairo_image_surface_create_for_data (CVPixelBufferGetBaseAddress (pixels), +@@ -458,6 +455,12 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, + (int)CVPixelBufferGetBytesPerRow (pixels)); + + ++ cairo_rect_from_nsrect (&bounds_rect, &backing_bounds); ++ bounds_region = cairo_region_create_rectangle (&bounds_rect); ++ ++ impl_rect.width = cairo_image_surface_get_width (impl->cairo_surface); ++ impl_rect.height = cairo_image_surface_get_height (impl->cairo_surface); ++ + cairo_region_intersect_rectangle (bounds_region, &impl_rect); + copy_rectangle_argb32 (cvpb_surface, impl->cairo_surface, bounds_region); + +@@ -465,7 +468,9 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, + cairo_region_destroy (bounds_region); + _gdk_quartz_unref_cairo_surface (gdk_window); // reffed in gdk_window_impl_quartz_begin_paint + CVPixelBufferUnlockBaseAddress (pixels, 0); ++ + --impl->in_paint_rect_count; ++ + self.layer.contents = NULL; + self.layer.contents = (id)CVPixelBufferGetIOSurface (pixels); + } +diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h +index a6e644b870..6b7986cedd 100644 +--- a/gdk/quartz/gdkprivate-quartz.h ++++ b/gdk/quartz/gdkprivate-quartz.h +@@ -27,7 +27,8 @@ + #include "config.h" + + #define GDK_WINDOW_IS_QUARTZ(win) (GDK_IS_WINDOW_IMPL_QUARTZ (((GdkWindow *)win)->impl)) +- ++/* Cairo surface widths must be 4-pixel byte aligned so that the image will transfer to the CPU. */ ++#define GDK_WINDOW_QUARTZ_ALIGNMENT 16 + + /* Display */ + +diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c +index 9f8534e5c1..429f2bc0cf 100644 +--- a/gdk/quartz/gdkwindow-quartz.c ++++ b/gdk/quartz/gdkwindow-quartz.c +@@ -306,9 +306,10 @@ gdk_quartz_ref_cairo_surface (GdkWindow *window) + gint height = gdk_window_get_height (impl->wrapper); + gint scale = gdk_window_get_scale_factor (impl->wrapper); + gint scaled_width = width * scale; ++ const gint align = GDK_WINDOW_QUARTZ_ALIGNMENT; + +- if (scaled_width % 16) +- scaled_width += 16 - scaled_width % 16; // Surface widths must be 4-pixel aligned ++ if (scaled_width % align) ++ scaled_width += align - scaled_width % align; // Surface widths must be 4-pixel aligned + + impl->cairo_surface = gdk_quartz_create_cairo_surface (impl, + scaled_width, +@@ -929,6 +930,8 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display, + NSUInteger style_mask; + int nx, ny; + const char *title; ++ const gint scale = gdk_window_get_scale_factor (window); ++ const guint align = GDK_WINDOW_QUARTZ_ALIGNMENT / scale; + + /* initWithContentRect will place on the mainScreen by default. + * We want to select the screen to place on ourselves. We need +@@ -942,6 +945,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display, + nx -= screen_rect.origin.x; + ny -= screen_rect.origin.y; + ++ if (window->width % align) ++ window->width += align - window->width % align; ++ + content_rect = NSMakeRect (nx, ny - window->height, + window->width, + window->height); +-- +2.37.1 (Apple Git-137.1) + diff --git a/patches/libxml2-python-config.patch b/patches/libxml2-python-config.patch index 6844fec0..ac6808ef 100644 --- a/patches/libxml2-python-config.patch +++ b/patches/libxml2-python-config.patch @@ -1,23 +1,13 @@ ---- 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/configure.ac b/configure.ac +index fa24ca66..79dab797 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -754,7 +754,7 @@ dnl + + AS_IF([test "x$with_python" != "xno"], [ + AM_PATH_PYTHON +- PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) ++ PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}-embed]) + ]) + AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"]) + diff --git a/patches/libxml2.9.10-conditional-parentheses.patch b/patches/libxml2.9.10-conditional-parentheses.patch deleted file mode 100644 index 3c6d9837..00000000 --- a/patches/libxml2.9.10-conditional-parentheses.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -u /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/libxml2-2.9.10/python/libxml.c\~ /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/libxml2-2.9.10/python/libxml.c ---- a/python/libxml.c 2019-10-22 11:46:01.000000000 -0700 -+++ b/python/libxml.c 2021-04-10 16:44:06.000000000 -0700 -@@ -294,7 +294,7 @@ - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; -@@ -359,7 +359,7 @@ - lenread = PyBytes_Size(ret); - data = PyBytes_AsString(ret); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (ret) { -+ } else if (PyUnicode_Check (ret)) { - #if PY_VERSION_HEX >= 0x03030000 - Py_ssize_t size; - const char *tmp; - -Diff finished. Sat Apr 10 16:50:53 2021 -diff -u /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/libxml2-2.9.10/python/types.c\~ /Users/john/Development/gtk-build/gtk-stable-10.13-x86_64/src/libxml2-2.9.10/python/types.c ---- a/python/types.c 2019-10-22 11:46:01.000000000 -0700 -+++ b/python/types.c 2021-04-10 16:48:01.000000000 -0700 -@@ -602,16 +602,16 @@ - if (obj == NULL) { - return (NULL); - } -- if PyFloat_Check (obj) { -+ if (PyFloat_Check (obj)) { - ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj)); -- } else if PyLong_Check(obj) { -+ } else if (PyLong_Check(obj)) { - #ifdef PyLong_AS_LONG - ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj)); - #else - ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj)); - #endif - #ifdef PyBool_Check -- } else if PyBool_Check (obj) { -+ } else if (PyBool_Check (obj)) { - - if (obj == Py_True) { - ret = xmlXPathNewBoolean(1); -@@ -620,14 +620,14 @@ - ret = xmlXPathNewBoolean(0); - } - #endif -- } else if PyBytes_Check (obj) { -+ } else if (PyBytes_Check (obj)) { - xmlChar *str; - - str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj), - PyBytes_GET_SIZE(obj)); - ret = xmlXPathWrapString(str); - #ifdef PyUnicode_Check -- } else if PyUnicode_Check (obj) { -+ } else if (PyUnicode_Check (obj)) { - #if PY_VERSION_HEX >= 0x03030000 - xmlChar *str; - const char *tmp; -@@ -650,7 +650,7 @@ - ret = xmlXPathWrapString(str); - #endif - #endif -- } else if PyList_Check (obj) { -+ } else if (PyList_Check (obj)) { - int i; - PyObject *node; - xmlNodePtr cur; - -Diff finished. Sat Apr 10 16:48:32 2021 diff --git a/patches/libxslt-python-config.patch b/patches/libxslt-python-config.patch new file mode 100644 index 00000000..ccc92f4d --- /dev/null +++ b/patches/libxslt-python-config.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index baeee600..da430c22 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -185,7 +185,7 @@ AC_ARG_WITH(python, + + AS_IF([test "x$with_python" != "xno"], [ + AM_PATH_PYTHON +- PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) ++ PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}-embed]) + ]) + AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != "xno"]) + diff --git a/patches/pango-coretext-fix-clang-build-failure.patch b/patches/pango-coretext-fix-clang-build-failure.patch new file mode 100644 index 00000000..8476d50f --- /dev/null +++ b/patches/pango-coretext-fix-clang-build-failure.patch @@ -0,0 +1,30 @@ +From 9093ffd69850b630622a3fc8dcf09c45c51ae2f9 Mon Sep 17 00:00:00 2001 +From: John Ralls +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/patches/tiff-nohtml.patch b/patches/tiff-nohtml.patch index 0368fb07..3c2f6f43 100644 --- a/patches/tiff-nohtml.patch +++ b/patches/tiff-nohtml.patch @@ -1,44 +1,57 @@ ---- 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" +--- a/Makefile.in 2023-02-19 19:31:46.135333554 +0700 ++++ b/Makefile.in 2023-02-19 19:32:28.379010562 +0700 +@@ -148,9 +148,9 @@ + SOURCES = + DIST_SOURCES = + RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ +- ctags-recursive dvi-recursive html-recursive info-recursive \ ++ ctags-recursive dvi-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ +- install-exec-recursive install-html-recursive \ ++ install-exec-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ +@@ -400,7 +400,6 @@ + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +-htmldir = @htmldir@ + includedir = @includedir@ + infodir = @infodir@ + install_sh = @install_sh@ +@@ -908,10 +907,6 @@ + dvi-am: --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" +-html: html-recursive +- +-html-am: +- + info: info-recursive - 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 + info-am: +@@ -924,10 +919,6 @@ - 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 + install-exec-am: ---- 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 +-install-html: install-html-recursive +- +-install-html-am: +- + install-info: install-info-recursive --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) - + install-info-am: +@@ -972,10 +963,10 @@ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ +- distdir distuninstallcheck dvi dvi-am html html-am info \ ++ distdir distuninstallcheck dvi dvi-am info \ + info-am install install-am install-data install-data-am \ + install-dist_docDATA install-dvi install-dvi-am install-exec \ +- install-exec-am install-html install-html-am install-info \ ++ install-exec-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \