about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/gtk/patches
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/gtk/patches
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gtk/patches')
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch54
-rw-r--r--nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch31
2 files changed, 85 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch
new file mode 100644
index 000000000000..3b1c080abf08
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/2.0-gnome_bugzilla_557780_306776_freeciv_darwin.patch
@@ -0,0 +1,54 @@
+From 8b822ab0060acdf4217f589411fe71574cbb09c0 Mon Sep 17 00:00:00 2001
+From: Daniel Trebbien <dtrebbien@gmail.com>
+Date: Fri, 3 Jul 2015 12:08:18 -0400
+Subject: [PATCH] quartz: Bug 557780 - Missing support for depth == 1 in
+ gdk_image_new_for_depth()
+
+When the gtk2 client of Freeciv is started, an assertion failure is seen
+immediately and the client stops:
+"Gdk:ERROR:gdkimage-quartz.c:325:_gdk_image_new_for_depth: assertion
+failed: (depth == 24 || depth == 32)"
+
+In this case, _gdk_image_new_for_depth() is being called from
+_gdk_quartz_image_copy_to_image(). The GdkImage passed to this function
+is NULL so a new GdkImage is created. However, the depth of the passed
+GdkDrawable is 1 and this is passed directly as the `depth' parameter to
+_gdk_image_new_for_depth(), leading to the assertion failure.
+
+In _gdk_quartz_image_copy_to_image(), rather than directly pass the
+GdkDrawable's depth to _gdk_image_new_for_depth(), if the depth is 1,
+then create the new GdkImage with depth 24. The case where the depth is
+1 is already handled in _gdk_quartz_image_copy_to_image().
+
+This allows the Freeciv 2.5.0 gtk2 client to start and play a game.
+---
+ gdk/quartz/gdkimage-quartz.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/gdk/quartz/gdkimage-quartz.c b/gdk/quartz/gdkimage-quartz.c
+index 493efba..853ef61 100644
+--- a/gdk/quartz/gdkimage-quartz.c
++++ b/gdk/quartz/gdkimage-quartz.c
+@@ -43,10 +43,15 @@ _gdk_quartz_image_copy_to_image (GdkDrawable *drawable,
+ 
+   screen = gdk_drawable_get_screen (drawable);
+   if (!image)
+-    image = _gdk_image_new_for_depth (screen, GDK_IMAGE_FASTEST, NULL, 
+-				      width, height,
+-				      gdk_drawable_get_depth (drawable));
+-  
++    {
++      gint drawable_depth = gdk_drawable_get_depth (drawable);
++      if (drawable_depth == 1)
++        drawable_depth = 24;
++      image = _gdk_image_new_for_depth (screen, GDK_IMAGE_FASTEST, NULL,
++                                        width, height,
++                                        drawable_depth);
++    }
++
+   if (GDK_IS_PIXMAP_IMPL_QUARTZ (drawable))
+     {
+       GdkPixmapImplQuartz *pix_impl;
+-- 
+2.3.2 (Apple Git-55)
+
diff --git a/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch b/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch
new file mode 100644
index 000000000000..01f4377aa0a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/gtk/patches/4.0-fix-darwin-build.patch
@@ -0,0 +1,31 @@
+diff --git a/gdk/macos/gdkmacospasteboard-private.h b/gdk/macos/gdkmacospasteboard-private.h
+index fdeb936..c4b8666 100644
+--- a/gdk/macos/gdkmacospasteboard-private.h
++++ b/gdk/macos/gdkmacospasteboard-private.h
+@@ -27,6 +27,10 @@
+ 
+ G_BEGIN_DECLS
+ 
++#ifndef AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
++typedef NSString *NSPasteboardType;
++#endif
++
+ @interface GdkMacosPasteboardItemDataProvider : NSObject <NSPasteboardItemDataProvider>
+ {
+   GdkContentProvider *_contentProvider;
+diff --git a/gdk/macos/gdkmacospasteboard.c b/gdk/macos/gdkmacospasteboard.c
+index 66b3c9f..b9e0d8a 100644
+--- a/gdk/macos/gdkmacospasteboard.c
++++ b/gdk/macos/gdkmacospasteboard.c
+@@ -400,7 +400,11 @@ _gdk_macos_pasteboard_register_drag_types (NSWindow *window)
+       gdk_content_formats_get_gtypes (formats, &n_gtypes);
+ 
+       if (n_gtypes)
++#ifdef AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER
+         [ret addObject:NSPasteboardTypeURL];
++#else
++        [ret addObject:[[NSString alloc] initWithUTF8String:"public.url"]];
++#endif
+ 
+       gdk_content_formats_unref (formats);
+     }